I made a Crouch Animation Script and the only thing thats missing is: When you stand still, the crouch animation keeps playing… How do I fix that?
My script: (feel free to edit and use it)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Animate
local Humanoid = player.Character:FindFirstChild('Humanoid')
mouse.KeyDown:Connect(function(Key)
if Key == "c" then
Humanoid.WalkSpeed = 6 ---- change 6 to what speed you want
local Animation = Instance.new("Animation", player.Character)
Animation.AnimationId = "rbxassetid://6017867663"
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
end
end)
mouse.KeyUp:Connect(function(Key)
if Key == "c" then
Humanoid.WalkSpeed = 16
Animate:Stop()
end
end)