Tool cooldown script

How can I create a cooldown script bc I am stuck at this part here:

tool.Equipped:Connect(function()

end)

tool.Uneqipped:Connect(function()

end)

I think I should add a wait() somewhere in there but I am not sure. The script should make the player wait x seconds before equipping it so i am guessing it should be before tool.Equip?


tool.Enabled = false
wait(x time) 
tool.Enabled = true

should work but I’m not 100% sure