Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my loop is not showing in the output when i tell my script to print it why is this happening?

Asked by 5 years ago

i was practicing making loops and when i tell the script to print the loop it does not work. can someone please explain how i can do this properly. my script is this:~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~e = 1

repeat print (wall) wall = e + 1 until wall == 12

0
wall isn't a thing greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
local wall = 0
repeat wait() print(wall) wall = wall + 1 until wall >= 12

You need the wait() and wall was not defined in the start

To add 2 variables in a loop you could do this:

local num1 = 4
local num2 = 2
local total -- we will define this later
print(num1+num2)
total = num1+num2 -- the total is the first and the second number combined

You can change num1 and num2 to anything.

0
can you add to variables together in loops if so could you give me an example? EzireBlueFlame 14 — 5y
0
yes, lemme edit my question greatneil80 2647 — 5y
Ad

Answer this question