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
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
** You are now Level 7! **