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 10 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 — 10y

1 answer

Log in to vote
2
Answered by 10 years ago
countgui = Instance.new("ScreenGUI", StarterGUI)
countdown = Instance.new("TextBox", countgui)
countdown.Position = UDim2.new(POSITION)
countdown.Size = UDim2.new(SIZE)
countdown.Visible = false
--Put other looks here
countdown.Visible = true
countdown.Text = "Starting New Game..." wait(3)
countdown.Text = 20
local count = 20
repeat
count = count -1
countdown.Text = count
until count==0

You can shorten it by using repeats and variables.

Ad

Answer this question