How can i make a patrol bassed enemy

so i want to make an enemy for my 3d platformer game but the problem is that i only want it to start chasing the player once they enter a “trigger box” thats around where the enemy is kinda like how they do it in field trip z

i dont know how to code at all but i was thinking you would probally reference the trigger box which would be called “TriggerBox” and then use a touched event i also dont know the code for how to make the enemy follow the player

anyways thats all

You can use some simple trig if you want to verify a player is in the line of sight of the NPC. Otherwise, you can raycast around the NPC to detect a hit or you can simply get the magnitude of the player.