PathFindingService not working for my character

So, I’ve copied my character’s animation script and paste it into my character model which I’ve imported. Then, I coded my pathfinding service script inside the model but it didn’t work. But when I tried to use the pathfinding script on a random NPC I got from thee toolbox, it worked.

Help me solve this problem, thank you!
Pathfinding script:

local pathfinding = game:GetService("PathfindingService")

local hum = script.Parent.Humanoid
local root = script.Parent.HumanoidRootPart
local goal = game.Workspace.Part

local createPath = pathfinding:CreatePath()
createPath:ComputeAsync(root.Position,goal.Position)

local waypoints = createPath:GetWaypoints()

for i,v in ipairs(waypoints) do
	if v.Action == Enum.PathWaypointAction.Jump then
		hum.Jump = true
	end
	
	hum:MoveTo(v.Position)
	hum.MoveToFinished:Wait(1)
end

Picture of my character model.

1 Like

First, I am finding resources for you . Then, your Animate script is a local script, which won’t work. Try copying the contents of the script (values, animations, content of script) and place into a server script. Hope this fixed the animation. I will edit my post soon.

1 Like

Had done that but still doesn’t work. :frowning:

1 Like

A few months ago I watched a tutorial on how to pathfind. I made a pathfinding model with working animations and stuff. Try changing it up a little to fit your use.

https://www.roblox.com/library/5533871266/Pathfinding-Roman