How to insert an table into an table

similar to:

but in that topic it only inserts value not tables

here is my code that i tried to do so but didn’t work they are 2:

table.insert([Player.Name] = true, PlayerInvisibilityTable)
table.insert(Player.Name == true, PlayerInvisibilityTable)

they both give me an error which gives me trouble on fixing it is there a way inserting a table inside table.insert without making variables because this code wouldn’t entirely work

local PlayerTable = [Player.Name] = {
false;
}

those methods i did won’t actually work so is there a way in inserting a table in table.insert without writing it as an variable

PlayerInvisibilityTable[Player.Name] = true

tables are values too btw

3 Likes

my code is written in the table format like this

if PlayerInvisibility[Player.Name] then
   
end

how to insert a table in table using table.insert tho

like the … will be the solution for this thread if found

table.insert(..., PlayerInvisibilityTable)

Why do you want to use table.insert when it only inserts to the array part of the table? Don’t you have a dictionary on your hands?

this is the format of my table

-- example
local List = {
	FerbZides = false
}

Okay, so my reply answers your question. You are working with dictionaries, table.insert is not a solution here.

but now i can add but how about removing them from the list?

Just do List[Player.Name] = nil