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

How would i get the npc to go to a second location?

I tried using an if statement but it didnt work.

repeat
	script.Parent:MoveTo(game.Workspace.goingto.Position)
	wait(0)
until script.Parent.Parent.HumanoidRootPart.Position == Vector3.new(133.102, 3.55, 55.771)

1 comment

0

Use pathfinding

1 answer

✓ Accepted answer

Never, EVER check the humanoid position to stop a walk to. Use the movetofinished event

while true do
	script.Parent:MoveTo(game.Workspace.goingto.Position)
	script.Parent.MoveToFinished:Wait()
end

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