Hello, I want to make an npc walk to waypoints but the problem is that there are so many waypoints that typing them all out individually like this would take a long time
Humanoid:MoveTo(Waypoint1) Humanoid:MoveTo(Waypoint2) Humanoid:MoveTo(Waypoint3)
Is there any way i could just make npc walk to another waypoint without doing what i did earlier?
local waypoints = {waypoint1, waypoint2, waypoint3} for i, v in pairs(waypoints) do Humanoid:MoveTo(v) Humanoid.MoveToFinished:Wait() end
You can wait until it finished walking to a waypoint by using Humanoid.MoveToFinished:Wait()
for every Humanoid:MoveTo()
Humanoid:MoveTo(Waypoint1) Humanoid.MoveToFinished:Wait() Humanoid:MoveTo(Waypoint2) Humanoid.MoveToFinished:Wait() Humanoid:MoveTo(Waypoint3) Humanoid.MoveToFinished:Wait()