A smart bot is looking for a player

This is forum that’s already solved on how to make the NPC FOV.
The solution post has a code excerpt. Using the code, you can get the players in the FOV and do whatever you want with them (like call another function to lock onto them and start shooting)