What do these things mean? Also please give good example.
✓ ANSWER ACCEPTED
What does for i,v in pairs mean? What does return true mean?
1 answer
✓ Accepted answer
For Loops:
for i,v in pairs(obj)
You might have seen something like that, the purpose is to loop through the components of a model or a list, returning the next step in the array
local Model = workspace.Model
for i, v in pairs(Model:GetChildren()) do
print(i, v.Name)
end
i will give you a number, v will give you the child of the model... since we are using GetChildren()
returning is a way of giving back,
local item = false
local function doSomething()
if item == false then
return false
else
return true
end
end
if doSomething() == false then
print("returned false")
end
breaking or returning can end loops too.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
model is incorrect. referencing a model doesn't implicitly return the getchildren of it. it's just a list / dictionary
returning all the children yeah...