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.
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)
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.