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

How to make backwards for loop? It doesn't allow me to do so.

I can make a for loop go from 0 to 10, but I can't make the for loop go from 10 to 0. For example this works:

for i = 0,10 do

but this doesn't:

for i = 10,0 do

1 answer

✓ Accepted answer

Well, you could just do that:

for i = 0,10 do
	print(10 - i)
end

2 comments

0

why not for i=10,0,-1 do print(i) end ?

0

I suppose you could do that as well

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