I'm trying to make an NPC go around using waypoints (1-9). It does well the first 4 waypoints and starts going towards the 5th but half the way there the NPC starts going to waypoint 6. My code:
local waypoints = game.Workspace.Paths:GetChildren() for waypoint=1, #waypoints do script.Parent:MoveTo(waypoints[waypoint].Position) script.Parent.MoveToFinished:Wait() end