I HAVE TRIED! OK?! I HAVE TRIED!! SHEESH!! It's pretty obvious, I want an animation script to run and loop when Q is pressed and when Q is released, it obviously stops.. can you help? I mean, I got the animation working! Like, when I press Q it runs and all but I want the walkspeed to increase to 24.. but I also want it so, when you press Q again, it stops and the walkspeed returns to 16.
-- But what if I want to stop this animation? I tried to put
wait(2)
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
Mouse.KeyDown:connect(function(key)
if key == "q" then
s = player.Character.Humanoid:LoadAnimation(game.StarterPack.LocalScript.Animation)
s:Play()
else
if key == "q" then
s = player.Character.Humanoid:LoadAnimation(game.StarterPack.Localscript.Animation)
s:Stop()
end
end
end)
-- But idk if this is right. Oh! And I want mu walkspeed to be 24 when I press Q and the animation activates. Can you please help?

1 comment
Yes this was in a LocalScript in StarterPack