I’m trying to add a cooldown for stealing in my basketball game, however I’m not quite sure why the debounces I added are not functional as the server still fires the remote allowing the animation to be spammed.
The reason I’m making a thread is because despite looking through the many threads available on Debounces, everything i tried simply wouldn’t produce a better outcome.
UIS.InputBegan:connect(function(input,gpe, IsTyping)
local StealDebounce = false
if gpe then
return
end
if not HasBall() then
if input.KeyCode == Enum.KeyCode.R and Guarding == true and StealDebounce == false and not IsTyping then
StealEvent:FireServer()
StealDebounce = true
wait(3)
StealDebounce = false
end
end
end)
Thanks in advance!
-SpaceHex-