I'm making a pathfinding script where an NPC follows a player, but I don't know how to define the humanoid. I'd appreciate it if someone could give me 1 or 2 ways on how to make a variable for a humanoid.

Edit: Just wanna clarify: I wanna make a variable for the humanoid that the NPC follows, and I'd like to make the NPC just follow the nearest player but can also switch targets like in ROBLOX RPG games.

2 comments

0

Who's humanoid? The NPC's? Or the player it follows? If is the player it follows, it depends, it follows a single player? It follows the nearest player?

0

I gave more detail now, thanks for letting me know about that