NPC that follow a certain player

Hi guys, how can I script an NPC that follow a certain player (a player that has bought a gamepass).How can I script the NPC and the gamepass ?Thank you for help!

Modify a movement script per part to change the part not the humanid root of the player and use the https://developer.roblox.com/en-us/api-reference/function/GamePassService/PlayerHasPass to check if the person has the gamepass

Hey edit, the link i send is not recommanded this is the recommanded https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/UserOwnsGamePassAsync

2 Likes

You want to use marketplace service, check if player has the gamepass and then spawn an NPC that follows specific players torso, I’d recommend pathfinding service:
https://developer.roblox.com/en-us/articles/Pathfinding

2 Likes

Still i think, pathfinding would be too laggy for this type. If he just wants a player getting followed, he should use MoveTo since its not a new path what is getting created.

1 Like

Yeah I guess, pathfinding isn’t the perfect solution, but I agree.