How to check if player no longer can see pawn(AI)

Thanks maan after 2 days of hard working I managed to make it work.
You are a real LifeSaver!