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

to be honest i’d prefer pawnsensing over linetrace but i’ll give it a try