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

Inserting a table into a pre-existing table using a script?

Trying to figure out how to do this, this is all I have so far:

local v = workspace.Model

table.insert(saving_table, 
{
	Model_Name = v.Name, 
	Part_Name = v.PrimaryPart.Name,
	Position = {v.PrimaryPart.Position.X, v.PrimaryPart.Position.Y, v.PrimaryPart.Position.Z}
})

I test it out and all it does is when I do this:

print(saved_data[1].Part_Name)

It doesnt recognize the key, and the only one it does seem to recognize is Model_Name or:

print(saved_data[1][1])

1 answer

Perhaps there was no PrimaryPart? You should account for this.

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