Hi I was just playing with pathfindingservice and noticed that the npc in the workspace moves jerkily when I 'play' it in studio or in game, while it doesn't when using the 'run' it in studio. Also, although the npc has an animate script, it is not showing the walking/jumping animation.

local humrootpart = script.Parent.HumanoidRootPart.Position
local goal = workspace.fjbh.Position
local hum = script.Parent.Humanoid

local path = game:GetService("PathfindingService"):FindPathAsync(humrootpart,goal)
local points = path:GetWaypoints()

if path.Status == Enum.PathStatus.Success then
    for i,v in pairs(points) do
        hum:MoveTo(v.Position)
        hum.MoveToFinished:Wait()
        if v.Action == Enum.PathWaypointAction.Jump then
            hum.Jump = true
        end
    end
end

There is no problem with the script (I think), I just want to know if there's a way to fix this. Please Help