Hello, I'm making a fighting game (JoJo Game) and I'm wondering how do I make a cooldown without using wait(). Maybe your wondering: "Why does he need a cooldown without using wait()", It's because I'm making an attack script with a couple of attacks and if I use wait() it just stops the whole script and it just ruins the immersion.
ZZZ = Mouse.KeyDown:connect(function(key)
if key == "t" then
Blast()
end
if key == "e" then
OHOra()
end
if key == "r" then
StrongOra()
end
if key == "f" then
TimeStop()
end
if key == "z" then
Jump()
end
end)
ZZZ1 = Mouse.KeyUp:connect(function(key)
if key == "e" then
Stop()
end
end)
wait(0.5)
D = false
This is a part of the script. So if I put a wait() in the E attack and I stop the attack I need to wait until I can do the R attack.
Help would be appreciated

4 comments
J O J O
Yare Yare Daze
What would cool down then?
I would also recommend you to use "UserInputService" and "ContextActionService" for detecting if a player pressed a key