Table.insert Help!

local a = { -- array example
	 {
          "fahblah",
		   {
				"b",
			    "c"
			}
	 }
}
local ab = {
          "blah",
		   {
				"bbb",
			    "ccc"
			}
	 }

print(table.insert(a, 1, ab))

It prints nothingness.

Help!

I don’t believe table.insert returns anything. What are you trying to print?

1 Like

Shouldn’t table.insert return the new table?

Insert it into the table, then print. Don’t do both at the same time. You basically doing this…

print(part.Transparency=1)

Ahh! See the issue. I changed it to:

local a = { 
	 {
          "fahblah",
		   {
				"b",
			    "c"
			}
	 }
}
local ab = {
          "blah",
		   {
				"bbb",
			    "ccc"
			}
	 }

table.insert(a, 1, ab)
print(a)

@ExcessEnergy was right! You can’t print table.insert. I printed the table.

I don’t think it does unfortunately. Just print the table as a separate command.