This is for a Tower Defense game. I intend to add teleportation for a group of people who can join the servers created by a player.
When a server is created, I’ve coded it to fire a remote event and I would like to create a table of the players that joined that specific server.
The problem is I don’t know how to name a table with the players UserID/User Name.
I have the players UserID, User Name (as above) but I can’t type the below code as it changes the value of the variable and doesn’t set the name of the table.
CSR.OnServerEvent:Connect(function(Player, UserID, UserName)
local UserID = {}
end)
I know this might be really easy or badly explained but I’m new to developing so I’m not really sure about a lot of stuff.
yeah so my code will make a table called playerTable - this table will hold other tables indexed by userID.
so to access them you first call the playerTable and then the userId index.