Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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:~~~~~~~~~~~~~~~~~

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



1 comment

0

wall isn't a thing

1 answer

✓ Accepted answer
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.

2 comments

0

can you add to variables together in loops if so could you give me an example?

0

yes, lemme edit my question

This discussion is preserved as it was. New answers, comments, and votes are closed.