When a player joins a game I want to add a table containing their information (inventory, variables etc.) to a global table that I can then index by using the player's name. For example, if I want to access a player's coins I could do:
_G.Players.[player name here].coins
But I can't quite figure out how to add a table to a global table using the name of the player. If anyone could help it would be very appreciated.

2 comments
I think you can do this with metatables.
i would use a module for this