Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a Text Changing GUI?

Asked by 11 years ago

I'm trying to make a GUI countdown from 20, to 1, but it doesn't show up. Here's the script:

countdown = script.Parent

countdown.Position = UDim2.new(655, 0, .4, 0) countdown.Visible = false wait(10) countdown.Visible = true

countdown.Text = "Starting New Game..." wait(3) countdown.Text = "20" wait(1) countdown.Text = "19" wait(1) countdown.Text = "18" wait(1) countdown.Text = "17" wait(1) countdown.Text = "16" wait(1) countdown.Text = "15" wait(1) countdown.Text = "14" wait(1) countdown.Text = "13" wait(1) countdown.Text = "12" wait(1) countdown.Text = "11" wait(1) countdown.Text = "10" wait(1) countdown.Text = "9" wait(1) countdown.Text = "8" wait(1) countdown.Text = "7" wait(1) countdown.Text = "6" wait(1) countdown.Text = "5" wait(1) countdown.Text = "4" wait(1) countdown.Text = "3" wait(1) countdown.Text = "2" wait(1) countdown.Text = "1" wait(1) countdown.Text = "0"

0
Messy scripting. Please try and get it together next time. ConnorVIII 448 — 11y

1 answer

Log in to vote
2
Answered by 11 years ago
01countgui = Instance.new("ScreenGUI", StarterGUI)
02countdown = Instance.new("TextBox", countgui)
03countdown.Position = UDim2.new(POSITION)
04countdown.Size = UDim2.new(SIZE)
05countdown.Visible = false
06--Put other looks here
07countdown.Visible = true
08countdown.Text = "Starting New Game..." wait(3)
09countdown.Text = 20
10local count = 20
11repeat
12count = count -1
13countdown.Text = count
14until count==0

You can shorten it by using repeats and variables.

Ad

Answer this question