I’m creating an inventory system and the way I’m approaching it (on the server side to avoid exploits) is to create a table for every player that joins the game and put their player ID inside of it so that each one can be easily identified by the script. I want to put all these tables into one big table, but I can’t figure out how to. I’ve tried using InventoryTables[table.create()]
and table.insert(InventoryTables,PlayerInventory)
but none of them have worked. How should I be going about this?
Using table.insert will work, you might’ve used it incorrectly.
local a = {"playerid"}
local b = {"pickaxe", "torch"}
table.insert(a,b)
print(a)
This will give a result of:
I flipped a and b in table.insert(), that’s what went wrong
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.