the problem is pathfindingservice thinks that it is shorter to turn , i think your script may be creating paths over and over until it reaches the target
It is likely because you are pathfinding too frequently. I recommend reducing the number of new paths you create to see if that remedies the issue.
Roblox’s PathfindingService is good but can have its issues. Unfortunately, this is one of them—if you use “ClickToMove” you will notice similar problems.
There is no direct way to resolve this problem apart from working around it.
Your visualization of the points is helpful; it seems you are pathfinding every few seconds.
You can make it so a new path is created after no new points have been met after a duration.
This may be a better approach.
So instead of creating a new one every few seconds, you can compare the time the rig met the last point and then decide if it should be recalculated.
May also save on performance, as you would only calculate when needed.