I'm having trouble getting this script to work, I need it to wait 3 minutes then it will show up and give the player the chance to click it. When it is clicked, it shouldn't be able to be clicked again and instead wait 3 minutes again, this will also give a badge when clicked. This is located inside the part I want to be clicked, and no, it isn't a local script. The problem is that it just will never show up and stay in the state of the waiting 3 minutes part forever. Here it is:
local part = script.Parent
local BadgeService = game:GetService("BadgeService")
local timer = 0
if timer == 180 then
part.Transparency = 0
while wait(30) do
part.ClickDetector.MouseClick:Connect(function(player)
BadgeService:AwardBadge(player.UserId, 4411773994)
part.Transparency = 1
end)
end
part.Transparency = 1
wait(1)
else
part.Transparency = 1
timer = timer + 1
wait(1)
end

1 comment
ok thanks so much i'lltry it