I am trying to fix up a pathfinding script I found, but I have come across a hurdle. When I use Humanoid.WalkToPoint with a Position value, it only outputs errors. Any ideas why?
Below is the code sample.
path:ComputeAsync(Root.Position, Closest.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
Humanoid.WalkToPoint(waypoint.Position)
print("run")
if waypoint.Action == Enum.PathWaypointAction.Jump then
Humanoid.Jump = true
end
Humanoid.MoveToFinished:Wait()
end