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"
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.