Humanoid:MoveTo() isn't working

Trying to use Humanoid:MoveTo for a custom model, but it isn’t working. I think I may have set it up wrong, but what could I change. All of the parts are unanchored and CanCollide is set to true.

image

local path = PathfindingService:CreatePath()
		path:ComputeAsync(grandpaHRP.Position, hrp.Position)
		
		for _, waypoint in path:GetWaypoints() do
			grandpaHumanoid:MoveTo(waypoint.Position)
			grandpaHumanoid.MoveToFinished:Wait()
		end

The code doesn’t run after the MoveToFinished since the model doesn’t actually move.

Try adding an if statement as such

local path = PathfindingService:CreatePath()
		path:ComputeAsync(grandpaHRP.Position, hrp.Position)
if path.PathStatus = Enum.PathStatus.Success then
		for _, waypoint in path:GetWaypoints() do
			grandpaHumanoid:MoveTo(waypoint.Position)
			grandpaHumanoid.MoveToFinished:Wait()
else print(“Failed to compute path”)
end

I just used this code. It’s not failing to compute the path, it’s just that the humanoid itself isn’t moving. I think something is wrong with the way the model is rigged.

Did you make this model yourself? I’ve come across free models that don’t work with MoveTo() like your case here. Then it could just be the way Grandpa’s body is built

I did not make the model itself. I’ll ask the person who made it how it was made.

Try the code with a standard character model and see if it works. Then you know if it is the model or not.

This is probably true as I did the same when I encountered a free model that didn’t move and the standard rig moved

Double check while testing (not in edit mode) to see if all the Parts are still unanchored.

Also, print your variables before using them to see if the code that sets them is working properly. If these numbers don’t match what you expect then you need to troubleshoot the other section of code:

print("grandpaHRP.Position = ", grandpaHRP.Position, "  hrp.Position = ", hrp.Position)
local path = PathfindingService:CreatePath()
		path:ComputeAsync(grandpaHRP.Position, hrp.Position)