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

How Do I Make An NPC Go And Walk From Point A To Point B?

I'm not quite sure how to make an NPC go from point A to point B, can someone explain a bit more, please?

1 answer

✓ Accepted answer

Inside an NPC's (or character's) model is an object called Humanoid.

This Humanoid has a method inside it called :MoveTo(). This method is simple - as long the character is rigged properly, the character will walk to the specified point from its current position.

Humanoid:MoveTo(Position)

Position is a Vector3 - the positional value roblox uses for 3D measurement in the Roblox engine.

local Position = Vector3.new(0,0,0)

You can see more on both of these things by checking out the Roblox Wiki.

local Position = Vector3.new(10,0,0)
Humanoid:MoveTo(Position)

Note that, as usual, Humanoid needs to be defined before it can be used.


Hope I helped!

~TDP

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