Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GetChildren in an array help?

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

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.