Crowne
|
  |
| Joined: 17 Nov 2013 |
| Total Posts: 154 |
|
|
| 24 Dec 2015 10:02 PM |
I am trying to make a countdown timer displayed through a Gui, and I can make it countdown but not display the countdown. Basically, the text won't change after I set it once.
gui = game.StarterGui.ScreenGui.TextBox
while true do i = 30 while true do gui.Text = "" wait(3) i = i - 1 gui.Text = "Intermission: "..i wait(1) if i == 0 then gui.Text = "Game starting..." end end end
|
|
|
| Report Abuse |
|
|
| |
|
Crowne
|
  |
| Joined: 17 Nov 2013 |
| Total Posts: 154 |
|
|
| 24 Dec 2015 10:04 PM |
| I've tried it other ways, yet still encounter the same issue. I've tried a for loop, and even setting it up using stringvalues yet the issue stays the same. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2015 10:04 PM |
try this:
timer(intvalue).Value = 30
while wait(1) do timer.Value = timer.Value - 1 if timertag.Value <=0 then break end end
(localscript): function onchange() timerlabel.Text = timertag.Value end timer.Changed:connect(onchange) |
|
|
| Report Abuse |
|
|
| |
|
cbhusker
|
  |
| Joined: 07 Feb 2011 |
| Total Posts: 517 |
|
|
| 24 Dec 2015 10:09 PM |
Well.. if I'm not mistaken the GUI that is located inside of StarterGUI is being changed but the one in the player's inventory isn't.
print("Hello World!") |
|
|
| Report Abuse |
|
|
| |
|