Detect when AI Perception loses sight of the player?

Ok great thanks for the help I’ll have a go at this later and let you know if it works!