Making a countdown but it only goes to 0 and only saids lowering lift then 0

So I am making a lift that teleport you to a different game sort of like Tower defense simulator or hero havoc so I am wondering what the problem with the script is

local textlabel = script.Parent

while true do
	local countdown = 30 -- timer till lower lift
	for i = countdown,0,-1 do
		textlabel.Text = ""..i..""
		if i == 0 then
			textlabel.Text = "Lowering Lift"

it only goes to 0 wait two seconds then lowering lift I want it to do a count down

I used a Script since it didnt work for a local script

also here is a video on problem

I think it’s like that because of the way you set up the loop. You’re starting at 0.
I think this is what you want?

local TextLabel = script.Parent
local Countdown = 30

for i = 0, Countdown do
TextLabel.Text = Countdown - i

TextLabel.Text = "Lowering Lift"

it should start at the countdown there
countdown would be going 30,29,28,27, etc

Yeah I tried this in studio and that’s what happened for me atleast

1 Like

Well it works and it fine thanks for the thing

1 Like