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

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

Asked by 4 years ago
Edited 4 years ago

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

0
What are you trying to do? ForeverBrown 356 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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
0
how would Insert the index I_UseAltAndVpn 47 — 4y
0
table.insert(Table,Values[1]) Kriscross102 118 — 4y
Ad

Answer this question