Hello! I have created a keybind roll script which plays an animation. However, I would like it to have a cooldown of like 1 second. Please provide the edited script as a reply. Script is below.
local player = game.Players.LocalPlayer repeat wait() until player.Character.Humanoid local humanoid = player.Character.Humanoid local mouse = player:GetMouse()
local anim = Instance.new("Animation") anim.AnimationId = "http://www.roblox.com/asset/?id=MYID"
mouse.KeyDown:connect(function(key) if key == "f" then local playAnim = humanoid:LoadAnimation(anim) playAnim:Play()
end
end)

1 comment
It works! Thanks man!!!