Reverse for loop not working

Not sure if this is an issue on my end, however this specific code does not work:

for i = 1, 15, -1 do
    print(i)
end

It used to be working fine last time I tried it, and now it doesn’t execute.

1 Like

It’s not smallest, biggest, increment, it’s start, end, increment.
Switch the one and the fifteen.

for i = 15, 1, -1 do
    print(i)
end
1 Like
for i = 15, 1, -1 do
    print(i)
end

your script would start at 1 and go in the negative numbers, never reaching 15

the one I sent starts at 15 and gets to 1 because 1 is smaller then 15

1 Like