repeat wait(1) until Term.BrickColor == BrickColor.new("Navy blue") if TUW <= 1200 and TUW > 0 then TUW = TUW - 1 print(TUW) script.Parent.CT.Text = tostring(TUW)
You're not understanding how a repeat loop works.
repeat --// This is what loops. until (condition)
A repeat loops is a lot like a while loop, except a while loop checks the condition first, while as a repeat loop checks its condition last.
This answer will help you understand them more.
I'm not sure what this code is even suppose to do, but you're missing an end, and that's basically all the syntax errors fixed.
repeat wait(1) until Term.BrickColor == BrickColor.new("Navy blue") if TUW <= 1200 and TUW > 0 then TUW = TUW - 1 print(TUW) script.Parent.CT.Text = tostring(TUW) end
If I were to guess I would say you meant to include your conditional statement in the loop:
repeat if TUW <= 1200 and TUW > 0 then TUW = TUW - 1 print(TUW) script.Parent.CT.Text = tostring(TUW) end wait(1) until Term.BrickColor == BrickColor.new("Navy blue") print("Done")
If this isn't the answer you were looking for, please explain more what it is you're trying to do.
Locked by OldPalHappy
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?