AI should only be able to move if player doesnt see it

There are plenty of tutorials on youtube for this. Just google AI vision check or something. Then use the blueprint code on your player instead on your NPC.

Do a LineTraceByChannel and check if the linetrace is hitting your AI.If it hits the AI its visible to the player, if the linetrace does not hit the AI, your AI is not visible for the player.