Hello, currently I am trying to fix an issue with a local script inside my tool.
The tool's click cool down is functional except for when a player will equip and unequip the tool very fast.
My code can be found here:
local remote = game.ReplicatedStorage.Events.Greens.GreenWrite
local debounce = false
game.Players.LocalPlayer:GetMouse().Button1Down:Connect(function()
if not debounce then
debounce = true
remote:FireServer()
wait(1)
debounce = false
end
end)

1 comment
Never trust the client. Checking everything on the server would be the right thing.