Using loop for waypoints don’t work well, try SimplePath or NoobPath, those resources already implemented a signal-based pathfinding system, and it’s generally easier to use compared to coding your own.
The Npc was going to the old position probably because the loops, the loop won’t stop until each waypoint is reached, then you start a new loop every 0.15 seconds, there will be multiple loops running at the same time, each telling the npc to go to a certain waypoint, potentially including waypoints from the previous path directing to the old position.
For the new version, you ignore all waypoints, only go to the second waypoint and computing new path every frame, however if the second waypoint is jump, the npc will move to that waypoint and try to do that. While the roblox pathfinding isn’t perfect, under complex environment like stairs, it might generate a waypoint that’s super close to the Npc as the second waypoint, which the npc might reach instantly, signaling Move Finished and jumps, then this repeats the next frame, causing endless jumping.
← Calculating path(s) every frame is not ideal, just several Npcs doing that can make everything slowdown