Pathfinding not working

So I’m making a pathfinding script that starts running when a remote event is fired. This is the script:

local RepStorage = game:GetService("ReplicatedStorage")
local ChasePlayerStealingCoffee = RepStorage:WaitForChild("ChasePlayerStealingCoffee")

local pathfindingservice = game:GetService("PathfindingService")

local humanoid = script.Parent.Humanoid
local torso = script.Parent.Torso

local path = pathfindingservice:CreatePath()

local PartToGoTo = game

ChasePlayerStealingCoffee.OnServerEvent:Connect(function(player,part)
	print("So it reached here-")
	PartToGoTo = player.Character.HumanoidRootPart.Position
	local waypoints = path:GetWaypoints()
	for i, waypoint in pairs(waypoints) do
		humanoid:MoveTo(waypoint.Position)
		humanoid.MoveToFinished:Wait()
	end
	
end)

It does print “so it reached here-”, however the noob model it is in does not move, at all.
Screen Shot 2021-06-10 at 2.01.15 PM

Any anchored parts inside of the model?

Are you sure there are waypoints in the path? I don’t think you are calling :ComputeAsync at any time are you?

I forgot to :ComputeAsync, thanks.

1 Like