I am creating a gun and I am wondering, how can I change the walking animation of it when I walk, and stop the animation when I am no longer walking. I tried using HumanoidStateType but that wont work since I cant detect if player stops. Only if he runs/walks.
I tried this:
local walk = gun.Humanoid:LoadAnimation(game.ReplicatedStorage.WeaponModules.Deagle.Animations.Walk) local hum = game.Players.LocalPlayer.Character.Humanoid if hum.WalkSpeed == 16 then walk:Play() end if hum.WalkSpeed == 0 then walk:Stop() end
but the animation wont stop even if I am not moving and my speed is 0. Sorry, I just never messed with it so I have no ideas how to make this.
Any help please?