[CLOSED] Thank you!

I am having trouble with pathfinding, there are no errors in my code. All it does is print “Moved To” in the output. The script’s parent is “AlreadyPro”:

local PS = game:GetService("PathfindingService")

local hum = script.Parent:WaitForChild("Humanoid")

local torso = script.Parent:WaitForChild("LowerTorso")

local path = PS:CreatePath()
path:ComputeAsync(torso.Position,workspace.endPart.Position)

local waypoints = path:GetWaypoints()

for i, waypoint in pairs(waypoints) do
    hum:MoveTo(waypoint.Position)
    hum.MoveToFinished:Wait(2)
    print("Moved To")
end

Edit

The character is un-anchored and the script is just a regular script.

Have you made sure that your character is not anchored?

ur script is a local script or server script???

@THEWOLF5555555 It is a server script.
@maxxswrld Yes, I have.

1 Like

Do you have any errors in your output?

Nope not really. [Placeholder] (I need to make it past 10 chars min)

I’m not sure but this script seems to work, maybe it’s because I added a final :MoveTo after the loop had finished, check that the humanoid root part is unanchored as well

local PS = game:GetService("PathfindingService")

local hum = script.Parent:WaitForChild("Humanoid")

local torso = script.Parent:WaitForChild("LowerTorso")

local path = PS:CreatePath()

path:ComputeAsync(torso.Position,workspace.endPart.Position)

local waypoints = path:GetWaypoints()

for i, waypoint in pairs(waypoints) do

hum:MoveTo(waypoint.Position)

hum.MoveToFinished:Wait(2)

print("Moved To")

end

hum:MoveTo(workspace.endPart.Position)
1 Like

Polaris-Nav will be released for testing soon, and it comes with a controller to easily follow paths. If you are still having problems (seems so) then you may want to check it out: Polaris-Nav

Can I get a place file for this bug? I’ll look into it deeper.

1 Like

I don’t know what happened but I made it work, thanks for the help.