Hello, So I am currently working on a combat script but i dont know how to make a proper stun script.
Here’s what i have tried:
--hit
stun = true
task.wait(1)
stun = false
--Problem: the wait function doesnt reset and if multiple comboes overwrite each other the stun will activate multiple times instead of once.
--hit
stun = true
task.wait(1)
stun = false
while stun do
--stun the player
task.wait(1)
--stop stunning the player
end
--same issue