Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 6 years ago

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)
0
Use pathfinding KawaiiX_Jimin 54 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

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
Ad

Answer this question