i want to make a limit for my part so that i could only click every 30 seconds
I am very bad at scripting and therefore could not find out, but what I have tried is under every butten event just to write wait(30) but it dident realy work
and that’s why I googled a lot and looked in the dev forum but didn’t really find anything
here would be the script any help is very welcome
script.Parent.MouseClick:Connect(function(click)
local event = math.random(1,3)
print(event)
if event == 1 then wait(30)
local part = workspace.Button
local BadgeService = game:GetService("BadgeService")
part.ClickDetector.MouseClick:Connect(function(player)
BadgeService:AwardBadge(player.UserId, 2124772323)
end)
elseif event == 2 then
for i, v in pairs(workspace.ZombieSpawns:GetChildren()) do
local Zombie = game.ServerStorage.Zombie:Clone()
Zombie.delete.Disabled = false
Zombie.Parent = workspace
Zombie.Torso.CFrame = v.CFrame
end
elseif event == 3 then
end
end)
please give me an example i don’t want to get a whole script from you.