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

GetChildren in an array help?

Asked by
VoltCode 101
7 years ago

I would like to do something like this:


qq = {} p = game.ReplicatedStorage.Q:GetChildren() for i = 1,amount_of_children do p.Child1 = qq[i] end

Anyone got an idea on how to do this please? Thanks in advance

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

It seems like you want to get a table with all the children?

GetChildren already returns you a table. You can just use that instead.

If you want everything inside of a table, just get the table.

If you want the number of things in a table, you put a # infront of it.

Example: #Object:GetChildren() or print(#{"Hia",", there"}) == 2

Ad

Answer this question