Your debounce system is currently server-wide, in other words when one client is debounced all clients are, consider using a debounce table instead, here’s an example of the former.
local players = game:GetService("Players")
local debounce = false
players.PlayerAdded:Connect(function(player)
if debounce then return end
debounce = true
print("Hello world!")
task.wait(10)
debounce = false
end)
This debounce system makes use of a single state variable which is shared by each player (client), so when one client activates the debounce the debounce becomes activated for every client. Here’s an example of the latter.
local players = game:GetService("Players")
local debounce = {}
players.PlayerAdded:Connect(function(player)
if debounce[player] then return end
debounce[player] = true
print("Hello world!")
task.wait(10)
debounce[player] = nil
end)
players.PlayerRemoving:Connect(function(player)
debounce[player] = nil
end)
Now the debounce system is unique to each player (client) and when one client activates the debounce it becomes activated for just that particular client. With this implementation you can remove leaving players from the table instantly (as it’s faster than waiting for the debounce cool down to expire).