Pathfinding Jolting at a certain point?

Hello! So, i’m currently writing some code for pathfinding from node to node through a loop. And the first few nodes it works lovely, but… eventually, the pathfinding starts jolting and freezing, like soemthing is blocking the code before it continues again.

Here is my little ghost i’m using:
https://gyazo.com/3541d9fefbee944fc0fa86a82cf10e1f

Why is he doing this?

There is nothing unusual or complicated about this code:

I have two versions, i have just a move to for walking through walls when it needs to. The circled part is what i’m concerned about. The reason i’m mostly using the pathfinding is because move to in a larger basis is not that precise for some reason. But never the less. I would use it if it went directly and exactly to the position i need but for some reason only pathfinding will do that for me.

But, there’s nothing in this code that should be halting the ghost or jolting him.
Can anyone help?

Thankyou!

1 Like

I Use repeat wait() until. Instead of MoveToFinished
wait until you are close to the path point

Could that also work for Just moveTo, instead of using pathfinding?

And what do I do just detect the magnitude between them?

Yeah just repeat wait until magnitude < distance and then after it is close it will move to the next point