I want walking animation to stop when player is not moving, i tryed if speed == 0 but doesnt works, thanks.
local Player = game.Players.LocalPlayer
local Tool = script.Parent
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Stance1Anim = game.ReplicatedFirst.Animations.Stances.DefStance
local Stance1MoveAnim = game.ReplicatedFirst.Animations.Stances.DefStanceMoving
local Stance1 = Humanoid:LoadAnimation(Stance1Anim)
local Stance1Move = Humanoid:LoadAnimation(Stance1MoveAnim)
local EquippedVal = script.Eq
EquippedVal = false
script.Parent.Equipped:connect(function(player)
Stance1:Play()
EquippedVal = true
end)
Humanoid.Running:Connect(function(speed)
if EquippedVal == true then
Stance1Move:Play()
end
end)
script.Parent.Unequipped:connect(function()
Stance1:Stop()
Stance1Move:Stop()
EquippedVal = false
end)

1 comment
try printing the speed variable to see what you get, it should be a float, if 0 doesnt work maybe try if < 1