local Animation = script.Parent.Humanoid:LoadAnimation(script:WaitForChild("Walking"))
script.Parent.Humanoid.Running:Connect(function(speed)
if speed <= 20 and speed > 0 then
print("walking")
Animation:Play(0.2)
elseif speed == 0 or script.Parent.HumanoidRootPart.Velocity.Magnitude == 0 then
print("not walking")
Animation:Stop(0.2)
end
end)
i have a custom non humanoid NPC that follows the player using MoveTo() and plays a walking animation but when it stops the animation doesnt stop