and I want to add a dictionary, I would try something like this but I know it won’t work:
table.insert(table, myNum = 9)
Is there a way to achieve something like I said above? I tried making a dictionary beforehand and adding that to the table but now its just a dictionary in a table, I want to add the key and value of the dictionary into the table.
Here is my entire script:
local inventoryDesc = {}
for _, v in next, player.inventoryFolder:GetChildren() do
local name = v.Name
local dictionary = {[name] = v.Value}
table.insert(inventoryDesc, dictionary) -- now its just a table and in it a dictionary, I want the key and the value to be saved into the table, not a dictionary inside of inventoryDesc
end
I can’t do it like that, in my folder there might be different amounts of children with different values and names. Sorry for not mentioning that first.