✓ Accepted answer
Great question.
So when using a for loop you can either do
List = {1,2,3,4,5,6,7,8,9,10}
for i = 1, #List do
print(List[i])
end
this will print all of the values of the list by adding + 1 to i every time so it prints a different value every cycle.
however, if you do in pairs like so
List = {1,2,3,4,5,6,7,8,9,10}
for i, value in pairs(List) do
print(value)
end
You will be able to actually just print value, instead of index through the List like the regular for loop.
These both will do the same thing but in some situations it is definitely better to choose one or the other.
1 comment
Sorry, I really don't know, but I know that i = index and v = variables, so: for "i,parts in pairs(Model)", aka index of the parts in a model (Pretty sure)