I'm trying to make a script that prints numbers 1-10. While 'a' is less than or equal to 5, it should print "less than or equal to 5." While 'a' is greater than or equal to 6, it should print "greater than or equal to 6."
How can I fix this script, or make something scripted differently that does the same thing?
a=0 repeat a=a+1 print(a) wait(1) while a<=5 do print("less than or equal to 5") wait(1) while a>=6 do print ("greater than or equal to 6") wait(1) end end until a==10
Well, that is a way to do it I suppose.
Aswell, you could use a for loop, such as:
for i = 1,10 do if i <= 5 then print("less than or equal to 5") elseif i>= 6 then print('Bigger than 5") end end