Repeat - Until not working

Hello Developers! The following code doesn’t function as intended. Any ideas?
image

I can provide more context if needed.

The problem is that it goes into the negatives, and doesn’t stop.
The initial time is 10 seconds.

Change your until line to

until Timer.Text == "0"

I believe the timer is a gui object. Then the text is a string, so it’s never equal to a number.

In some situations lua automatically converts strings to numbers or numbers to strings, but not when comparing them.

1 Like