table is a standard library, meaning you’re supposed to call functions from it rather than from your table itself. table is a global that points to said library. The “table” part isn’t intended to be substituted, it’s a global variable that you’re supposed to access insert from.
I’m not sure if tables is what I need then, basically I’m trying to make it to where when a player joins the game, it adds their name into a table. Maybe it’s dictionary I’m thinking of not sure.
If you intend to make a list then you are going to need tables anyhow. Dictionaries are a way of using tables but the underlying structure is still the same. Insert works with the array portion of tables.
Out of curiosity, is there any reason why GetPlayers itself does not suffice? If your intention is to create a list of players then the engine already provides you an API that can fetch the players in the current server. You can then use this array however you like. It is a table of instances so if you want names you can access the name property during iteration, e.g. the second variable of a generic for loop.