|
| 02 Aug 2015 06:04 PM |
Original Post: --has original script http://www.roblox.com/Forum/ShowPost.aspx?PostID=169730084
New Script That Works:
local buttonPressed = true local button = game.Workspace.Button local player = game.Players:FindFirstChild(script.Parent.Parent.Name) local timerGui = player.PlayerGui.Countdown
button.ClickDetector.MouseClick:connect(function() if not buttonPressed then return end buttonPressed = false for i = 180, 0, -1 do wait(1) timerGui.TimeFrame.Numbers.Text = i if i == 0 and buttonPressed == false then buttonPressed = true break end end end)
--[[ Notable mentions: I added a button that triggers the gui. I'm going to play around with it some. Try to have it countdown when a round starts, or make it do something when that time runs out. I also added a debounce of sorts...I think I kinda did it wrong, but hey, it works!!--]]
Thanks so much to everyone that has helped!!! |
|
|
| Report Abuse |
|
|
| 02 Aug 2015 06:11 PM |
there is an easier countdown method:
local wait = 10
for x = wait,1, -1 do script.Parent.Text = "Starting game in " .. x end |
|
|
| Report Abuse |
|