Path Finding Service being buggy

i need help I’m using path finding service to go to a part as like a transition scene but it’s like choppy and I’m losing my mind over it this is on a server sided script too

function util.WalkToTarget(npc, target)
    print("running...")
    local humanoid = npc and npc:FindFirstChildOfClass("Humanoid")
    local root = npc and npc:FindFirstChild("HumanoidRootPart")
    local destination = target.Position
    local function getpath()
        local pathParams = {
            ["AgentRadius"] = 2,
            ["AgentHeight"] = 5,
            ["AgentCanJump"] = false,
        }
        local path = PathfindingService:CreatePath()
        path:ComputeAsync(root.Position, destination)
        return path
    end
    local function moveToNextWaypoint()
        local path = getpath()
        for index, waypoint in pairs(path:GetWaypoints()) do
            humanoid:MoveTo(waypoint.Position)
            humanoid.MoveToFinished:Wait()
        end
    end
    moveToNextWaypoint()
    return true
end

https://gyazo.com/6fa2d011f9877c6e62084a7dfd0dbc80

1 Like

Very informative, and it’s very easy to construct a help based on such a very well documented problem.

Set the HumanoidRootPart (or really any part) NetworkOwnership to nil, also Yarik, despite having a questionable attitude, is right.

This is a problem you could of easily had fixed had you tried just searching up “Roblox NPC is pausing.” Don’t want to sound too rude but you should try looking up if there were anyone else that had a similar problem as yours

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.