Delay In movetofinished

how do I not make Humanoid.MoveToFinished:Wait() not delay my ai movement In pathfindingservice because I want to make an npc that uses waypoints that he will move to generates every 0.1 seconds without delaying when i move

connect to it with :Once or :Connect

What code are you currently using to handle the movement?
And generating the waypoints every .1 is almost certainly not what you want.
Usually you will generate the waypoints once, with some occasional refreshes if something changes, and then just setup a chain to:

  1. MoveTo current waypoint.
  2. connect to MoveToFinished with :Once with a function that would set the current waypoint to the next one trigger the MoveTo → listent to MoveToFinished chain again.
1 Like

I handle the movement by moveto current waypoint and i dont do number 2

I am intentionally generating waypoints every .1 to always make my npc follow what its supposed to follow forever

anyways thank you for helping it works now

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.