I’m using the Patrolling NPC script from the wiki and for some unknown reason, the NPC seems to be hopping in the game (as seen in the provided gyazo link), whilst in the studio the NPC is walking smoothly.
Looks like its because it is walking to each point, instead of directly to the destination, which cuts the walking animation short. So its not jumping, but just stopping the walking animation too soon. You could try spreading the points out so they aren’t so close to each other.
As a player you can replicate this by pressing W repeatedly to move forward instead of holding it down.
I noticed that tutorial isn’t using ComputeSmoothPathAsync which is what I used when testing a Goblin NPC that follows the player when the player gets within a certain range, but I am sure thats not necessary to fix the issue you are having, I just personally prefer that over FindPathAsync.
Edit: and I just realized that is depricated. So ignore that last bit.
Just so you know, AutoJumpEnabled is only functional on mobile, and only on player characters, not NPCs. I have no idea why the property is under the Humanoid and not the player, as it’s restricted as such.
I believe Dev_Ryan is on the right track here,
It does seem like it’s walking to each point and then moving to the next, causing it to briefly stop. To prevent this you can remove the “humanoid.MoveToFinished:Wait()” but add a distance variable that continuously updates within the loop and then once the NPC reaches a certain distance (using magnitude to detect the distance between the NPC’s Primary Part and the waypoint) from that point, move it to the next. This will make it smooth, and keep it on track to avoid obstacles, but you may need to adjust the distance. Here’s an example if I didn’t explain it greatly.
local distance
for waypointIndex, waypoint in pairs(waypoints) do
local waypointPosition = waypoint.Position
humanoid:MoveTo(waypointPosition)
repeat
distance = (waypointPosition - humanoid.Parent.PrimaryPart.Position).magnitude
wait()
until
distance <= 5
end
May not be the most efficient way to do it, but it’s how I do it when working with Pathfinding NPC’s, and it works well.
Hope it works for you!