I want to make it so you can only use the tool for 10 seconds, then you have to wait 1 minute to use it again.
local cd = true local tool = script.Parent local player = game.Players.LocalPlayer tool.Equipped:Connect(function() game.ReplicatedStorage.Phase:FireServer(true) end) tool.Unequipped:Connect(function() game.ReplicatedStorage.Phase:FireServer(false) end)
There’s many ways to do this.
You could on the server make the player added to a table that stops them from requesting again when found in it to initiate the cooldown.
For the 10 seconds timer, just use coroutine that automatically adds the player to the table on the server side or requests the event to do this as a spawned function. Example of coroutine use:
coroutine.wrap(function() game.ReplicatedStorage.Phase:FireServer(true) end)()
Due to how broad the question is, it is up to you on how you want to implement it.