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

How would I insert things into a table just inserting the values in a table? not whole table

So lets say I have a table

Table . = {}

TableWValues = {'G',false, f = true, ['KK'] = 'K'}


table.insert(Table, TableWValues)


--to index something inside TableWValues I'd have to do 


Table.TableWValues.f


--I just want to insert the values in table


-- So I can just do


Table.f 

I only want the values in TableWValues inserted

1 comment

0

What are you trying to do?

1 answer

ok, i see what you are trying to do, correct me if im wrong, but you're trying to insert all the values into table, so like this

local Table = {}
local Values = {"a", "b" ,"c", 1, 2, 3 ,workspace.Part}
for _,value in pairs(Values) do
	table.insert(Table,value)
end

2 comments

0

how would Insert the index

0

table.insert(Table,Values[1])

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