How would I stop an animation without making another animation? I tried anim:Stop() but it didnt work.
local Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
play = false
Mouse.KeyDown:connect(function(Key)
if(Key:lower() == "f") and play == false then
anim = Player.Character.Humanoid:LoadAnimation(script.animTest)
anim:Play()
Player.Character.Humanoid.WalkSpeed = 20
play = true
if(Key:lower() == "f") and play == true then
anim = Player.Character.Humanoid:LoadAnimation(script.animTest)
anim:Stop()
Player.Character.Humanoid.WalkSpeed = 16
play = false
end
end
end)

5 comments
What's the name of the animation in the script?
anim
Can you post a small snipbit of the script?
yea
Instead of having to press the key again with the if statement, what you could do is after the first if statement is declared, put a wait(Any variable you want) and then anim:Stop()