#i need help understanding this code
1 messages · Page 1 of 1 (latest)
ik what the whole code do, its just that i dont understand what both of the number ones do
do u mean 1,5,1?
the 1 is the start value, 5 is end, and teh second 1 is step
u technically dont need the step
so just 1,5
5 is inclusive
so ur 12 calls x 5 = 60 prints
starting value and increment
for i=start_value, goal_value, increment_by
increment is usually 1 so roblox lets you omit it for default of 1
your code does 1 to 5, but you could do it in reverse with for i=5, 1, -1
dude just gpt the answer, ask it to explain to a 5yr old
pretty sure a 5yr old would understand the difference between counting up vs counting down ...
The 5 is how many times it will be done, the second 1 is the amount of increments it will go up by, by default it will be 1 if you don’t include it and the 1st 1 is how many times it does the whole thing
what your doing is a for loop The first number you have (My counter) is 1 because you set it at 1, Thats where it first starts at, Then 5 Thats where it ends, and 1 thats how much it goes up by so it will go do that code 5 times