Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make an NPC that follows you when it sees you?

I've seen some NPCs that follow you if your near, but that won't be right because if the NPC is on the other side of the wall from where you were but you were still close it will see you...

I want an NPC that follows when your in its sight...

Please tell me if its possible...

2 comments

0

You can watch this video https://www.youtube.com/watch?v=BUwAcW_18Ws it might help u 

0

Thanks! It worked!

1 answer

Solution

You can create a ray from your npc to every Player and check the line of sight. If there is then check which player is the closest and then use Humanoid:MoveTo() to go to that player

This discussion is preserved as it was. New answers, comments, and votes are closed.