Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How i can take from 1 to 50 with :GetChildren()?

Asked by 5 years ago

Sorry for bad english,

I need take the first 50 result of this:

local children = workspace:GetChildren()
for i = 1, #children do
    print(i, children[i].Name)
end

I need take , for example, from 1 to 50

1 answer

Log in to vote
1
Answered by
Lazarix9 245 Moderation Voter
5 years ago
for i = 1, 50, 1 do

    print(i, children[i].Name)

end

it counts from 1 to 50 and each time it prints the name

Ad

Answer this question