LineTrace Visibility Issues

Hi, so my current task right now is to set an enemy, which is highly recognisable, which only moves when the player is not observing it. However I am having some issues, after finishing the first section, which is the LineTrace part, I noticed that no matter what the Boolean I set up to determine whether the enemy can move was always true, despite the fact that I was observing it:

I was wondering what was causing this issues, here’s the code in a clearer view:

Thanks for the help in advance…

You are always comparing the hit actor to the player controlled pawn, which might return false most of the time(if the start and end are the same point, nothing will appear on trace, so the out actor will be ‘None’ , and it IS different from player pawn)

If is it a First Person Camera, I believe there is events when it enters on viewport and when it leaves the viewport.