I tried modifying a script i found that makes you play a crouching animation once u press “c”. I tried to make it so that when you press both “c” and “w” it plays a walking crouch animation. but it didnt work. please tell me what im doing wrong.
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” and Key == “w” then
local Animation = Instance.new(“Animation”, player.Character)
Animation.AnimationId = “rbxassetid://5389650682”
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
end
end)
mouse.KeyUp:Connect(function(Key)
if Key == “c” and Key == “w” then
Animate:Stop()
end
end)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Animate
local Humanoid = player.Character:FindFirstChild(‘Humanoid’)
mouse.KeyDown:Connect(function(Key, typing)
if typing then return end
if Key.KeyCode == Enum.KeyCode.c and Key.KeyCode == Enum.KeyCode.q then
local Animation = Instance.new(“Animation”, player.Character)
Animation.AnimationId = “rbxassetid://5389650682”
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
end
end)
mouse.KeyUp:Connect(function(Key)
if Key.KeyCode == Enum.KeyCode.c and Key.KeyCode == Enum.KeyCode.q then
Animate:Stop()
end
end)
Maybe something like this may work, although I haven’t really used InputService that much.