Note: I did these In the pass and they work, just don't know why this doesn't
I made a debounce that prevent the player from spamming the tool via a RemoteEvent, but as the title says, the debounce refuse to stop the player from spamming
Script:
local tool = script.Parent
local Debounce = false
tool.Activated:Connect(function()
if Debounce == false and tool.Parent.IsStun.Value == true then
Debounce = true
tool.RemoteEvent:FireServer()
wait(5)
Debounce = false
end
end)

4 comments
The debounce will only stop the remote event from firing, not the tool from activating. if you want to disable the tool when debounce is active, you can set tool.Enabled.
Alright
But why Isn't the debounce stopping the tool from activating, and how can I stop It from stopping the event and actually stop the tool activation without using Tool.Enabled?
Oh and by the way, the script Is a local script Inside of a tool