Path not computing?

local Pathfinding = {}

local PathFindingService = game:GetService("PathfindingService")

Pathfinding.MoveTo = function(Char, Location)
	local Humanoid = Char.Humanoid
	local Torso    = Char.Torso
	
	local Path     = PathFindingService:CreatePath()
	Path:ComputeAsync(Torso.Position, Location.Position)
	local Waypoints = Path:GetWaypoints()
	warn(Path.Status)
	for i,v in pairs(Waypoints) do
		print("Go")
		Humanoid:MoveTo(v.Position)
		Humanoid.MoveToFinished:Wait(1)
	end
end

return Pathfinding

The function does get called and passes all data need. they are both vector3s. No errors in output but it just doesn’t compute the path?

You can’t move the humanoid; Change it to Char.

edit: this is wrong

That didn’t work, didn’t think it would because Humanoid:MoveTo() is a built in function.

1 Like

could I see the script calling the MoveTo function?

Oh my part was too big, the dude couldn’t get there because the block centerpoint was unreachable… i hate life.