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

Is there a way to insert values in tabes that are inside of tables?

My script:

t = {
	tier= {},
	cframe = {}
}

Is there a way to inset a value in the 'tier' table using table.insert?

1 answer

✓ Accepted answer

Of course. Things inside tables are just normal values, so you can do anything to them that you can do to any value.

local cframes = t.cframes
table.insert( cframes, CFrame.new() )

-- or, more simply

table.insert( t.cframes, CFrame.new() )

One of the main goals of a programming language is to provide consistency. With only a few exceptions, code that works in one place in Lua works anywhere in Lua.

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