Alright, so what this script is supposed to do is you activate it and it stays for 10 seconds, then after 10 seconds it deactivates and has a wait time of 45 to use it again whilst naming itself cooldown. But this isn't working, and I feel like it's probably something simple.
local cooldown = true
local tool = script.Parent
local player = game.Players.LocalPlayer
if tool.Activated:Connect() then
if cooldown == true then
script.Parent.Name = "Phase"
game.ReplicatedStorage.Phase:FireServer(true)
wait(10)
cooldown = false
end
end
if cooldown == false then
game.ReplicatedStorage.Phase:FireServer(false)
script.Parent.Name = "CoolDown"
wait(45)
cooldown = true
end

2 comments
it works for the first time then it stays in cooldown
nevermind, fixed it, it would work just not change the name because it would only change the name WHEN you activated it not even when you dont activate. thanks