#i need help understanding this code

1 messages · Page 1 of 1 (latest)

proper bane
#

ik what the whole code do, its just that i dont understand what both of the number ones do

frail wind
opal moth
#

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

proper bane
#

yes

#

ik what the 5 do

#

i dont understand the 1 aand the other 1

remote pagoda
#

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

proper bane
#

HUH

#

wdym

opal moth
remote pagoda
#

pretty sure a 5yr old would understand the difference between counting up vs counting down ...

bronze isle
#

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

indigo wind
# proper bane

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