Follow The Closest Player Script -

: The NPC identifies all active players in the game.

: It identifies the player with the shortest distance and sets them as the "target". Follow the closest Player Script

: The NPC uses Humanoid:MoveTo() or the PathfindingService to navigate toward that target's current position. : The NPC identifies all active players in the game