Tool Animation not working

Having a problem with this Tool Animation script I did bc it won’t even play- nor play the walking animation. can anyone help me with this one?

local Humanoid = script.Parent.Parent.Parent:WaitForChild("Humanoid")
local tool = script.Parent.Parent
local anim = Instance.new("Animation")
anim.AnimationId = 'https://www.roblox.com/Assest?ID=17648624553'
local track = Humanoid:LoadAnimation(anim)

local animWalk = Instance.new("Animation")
animWalk.AnimationId = 'https://www.roblox.com/Assest?ID=17648645407'
local trackWalk = Humanoid:LoadAnimation(animWalk)

track.Priority = Enum.AnimationPriority.Action
trackWalk.Priority = Enum.AnimationPriority.Action

Humanoid.Running:Connect(function(speed)
	if speed > 0 then
		track:Stop()
		trackWalk:Play()
	else
		trackWalk:Stop()
		track:Play()
	end
end)

tool.Equipped:Connect(function() 
	track:Play()
end)

tool.Unequipped:Connect(function() 
	track:Stop()
	trackWalk:Stop()
end)
1 Like

have you checked if the animation type and the game type are the same?
Go to your animation and see if it’s R6 or R15, because if your avatar is using for example R15 and the animation is for R6 it won’t work.
also i recommend to not do

Humanoid:LoadAnimation(anim)

but insted:

local track = Humanoid.Animator:LoadAnimation(anim)

If this is not the problem are there any errors in the output?

I made the animation, so I would know its for r15.

And I’ll try and see if the animator would work bc there’s no error outputs as well