So I'm trying to make the Za Warudo from JoJo's Bizzare Adventure. Pressing Q will send an event to a server script and the server script does the rest of the work. The thing is, the first press is fine; not spammable. But anything after that, you can constantly spam Za Warudo's. Any assistance? Something I did wrong or something I should do in the script? All help is appreciated. [P.S: It's probably something I did wrong with the debounce but I don't know what it is.]
local UIS = game:GetService("UserInputService")
local Event = game:GetService("ReplicatedStorage"):WaitForChild("Events").Abilities.ZaWarudo
local Player = game.Players.LocalPlayer
local Debounce = false
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
if not Debounce then
Debounce = true
print("Za Warudo triggered by "..Player.Name..".")
Event:FireServer(Player)
end
end
wait(20)
Debounce = false
end)

1 comment
Ah, it works now. Thanks