I see a few errors with your module, in your init function you are connecting to the player added event twice, resulting in the player being removed from the module. Next, I would add a loop for any existing players incase a player joins before the script is called. You can do this with a script like this
function DebounceHandler:Int()
for _, player in (Players:GetPlayers()) do
Debounce[Player.UserId] = {
["BlowDebounce"] = 0,
["SellDebounce"] = 0,
}
end
Players.PlayerAdded:Connect(function(Player)
Debounce[Player.UserId] = {
["BlowDebounce"] = 0,
["SellDebounce"] = 0,
}
print(Debounce)
end)
Players.PlayerRemoving:Connect(function(Player)
Debounce[Player.UserId] = nil
end)
end
This will loop through any existing players so they are added to the debounce table.
You set them all to zero, so when you check for whether or not the player has waited a long enough time, the number will be negative and be unable to be greater than or equal to the cooldown. The default numbers should be the current time:
I think the question is what does “working” mean, I don’t see any errors but it looks like the code doesn’t do what you want, could you explain your updated code and what the goal and process is?