So I have an NPC that moves and does NPC stuff, but it doesn't play animations. I have this script
``` local controller = script.Parent.Humanoid
local walk = Instance.new("Animation")
walk.AnimationId = ("rbxassetid://837009922")
local walktrack = controller:LoadAnimation(walk)
walktrack.Looped = true
local idle = Instance.new("Animation")
idle.AnimationId = ("rbxassetid://837011741")
local idletrack = controller:LoadAnimation(idle)
idletrack.Looped = true
script.Parent.Humanoid.Running:Connect(function(speed)
if speed ~= 0 then
walktrack:Play()
idletrack:Stop()
print("Walking")
elseif speed == 0 then
walktrack:Stop()
idletrack:Play()
print("Not walking")
end
end) ```
But it uh... doesn't do anything. I don't get any errors, but I do get 'Walking' and 'Not Walking'. Any help?