I edited a script and I made it where the item giver has a cooldown heres the script:
local PassId = 4835177
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MarketplaceService = game:GetService("MarketplaceService")
local BloxyCola = ReplicatedStorage:WaitForChild("????? ???? ???")
local player = game.Players.LocalPlayer
local bloxy = workspace:WaitForChild("itemgiver1")
bloxy.ClickDetector.MouseClick:Connect(function(player)
BloxyCola:Clone().Parent = player.Backpack
script.Parent.Transparency=1
script.Parent.ClickDetector:Destroy()
for i = 10, 1, -1 do -- give it a 60 second cooldown and show the timer
script.Parent.BillboardGui.TextBox.Text = tostring(i)
wait(1)
end
script.Parent.BillboardGui.TextBox.Text=(" ") --replaces text and resets everything back to normal
script.Parent.Transparency=0
local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = bloxy
ClickDetector.MaxActivationDistance = 10
end)
but when the item spawns back i can't click it again, even though it shows the click cursor. what am i doing wrong here?

1 comment
.