Tables are a very important part of some games. I sometimes even add players to tables! But there is a problem with that. I cant remove the layer from the table. Whenever I print the table, the data looks like:
table: 0x1a7105ac1e83c069
and I don't know how to remove that! I used player, player.Name, player.UserId, everything! please help me, and I would appreciate that!
There's two ways of doing this, one way consists of multi-line printing
local table1 = {"Jerry", "Squidward", "Spongebob"} for _,v in pairs(table1) do print(v) end
Here's another way, with one line printing
local table2 = {"Sandy", "Mr Krabs", "Plankton"} print(unpack(table2));
To remove you'd do
local table = {"one", "two", "three", "four", "five"} table.remove(table, 3) -- Would remove the 3rd argument which is "three"