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

how would i make something print numbers forever?

3 answers

✓ Accepted answer
for i = 1,math.huge do -- makes a for loop that runs infinitely.
print(i) -- prints i (the number the loop is on, which will go on forever.)
wait(.1)
end

Hope this helped!

All you really have to do is this, i'd recommend learning the basics of ROBLOX Coding such as while loops.

while true do
print(1)
wait(0.5) -- I recommend having a wait, otherwise your game will most likely crash.
print(2)
wait(0.5)
print(3)
wait(0.5)
print(4)
wait(0.5)
print(5)
wait(0.5)
print(6)
wait(0.5)
print(7)
wait(0.5)
print(8)
wait(0.5)

This should work, let me know if it doesn't repeat.

2 comments

0

You did not place an end after the while loop, and he wants INFINITE numbers. This can only be done in my answer, and yours just goes up to eight.

0

Yeah I saw at the last second and I was like, meh screw it lol. I ended up redoing it in a repeat form with n = 0,math.huge like you did lol

If you mean like 10 t/m 1 or smth here is an example:

for i = 10, 1, -1 do
	print(i)
	wait(1) -- Wait 1 sec for new number
end

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