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

Shows only 1 value in table but prints all value?

Hey! I want to get this folder of all its childrens and put it in a table. however it only puts one in. I tried print(unpack(ITEMLIST)) somehow it gave me all the values.

local ITEMTABLE = {"...",}

    local ITEMLIST = game:GetService("Workspace").Folder:GetChildren()
    
    table.insert(ITEMTABLE, tostring(unpack(ITEMLIST)))

1 answer

Do a for loop through the item list and insert each individual one into the item table.

for index, item in pairs(ITEMLIST) do
	table.insert(ITEMTABLE, item)
end

I didn't write this in Studio but the gist of it is to use a for loop to loop through the item list and insert each item into the item table.

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