I made a crouching animation for a game I'm working in which you hold ''c'' your character gets in a low position and their walk speed is slow. I have already made a walking animation for it where if you try moving while you're in that crouching position only your legs move, But I can't find a way to implant that crouch walk animation into the game. Any help?
Here's the crouch animation:
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
local Animation = Instance.new("Animation", player.Character)
Animation.AnimationId = "rbxassetid://02633068545"
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
Humanoid.WalkSpeed = 5.5
end
end)
mouse.KeyUp:Connect(function(Key)
if Key == "c" then
Animate:Stop()
Humanoid.WalkSpeed = 16
end
end)
===================================================================================
Video of what the crouching animation looks like: https://gyazo.com/d427b29ec06f88429bea89ea5f26c6c8

1 comment
Very helpful, thank you!