I’m making a crouch script with my R15 animations, I have a crouch idle and crouch walk animation. I only figured out how to make a single animation play, but how do I make it so when I’m not moving the idle animation plays and if I walk the walking animation plays?
This is the current script
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Animate
local Humanoid = player.Character:FindFirstChild(‘Humanoid’)
mouse.KeyDown:Connect(function(Key)
if Key == “q” then
local Animation = Instance.new(“Animation”, player.Character)
Animation.AnimationId = “rbxassetid://3968672841”
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
end
end)
mouse.KeyUp:Connect(function(Key)
if Key == “q” then
Animate:Stop()
end
end)
how it looks ingame:
https://gyazo.com/7d6b1bb0ff3d141e6310f341a4f6f995