This might be a dumb question but I am still new to table values etc. How can I insert a player name Into a table value as a string? So In short insert in a table a string value, that I can acess without using numbers.
the script:
local GamePlayers = {}
function PlayerAdded(NewPlr)
table.insert(GamePlayers,NewPlr.Name)
print(GamePlayers)
end
function PlayerLeft(NewPlr)
table.remove(GamePlayers,NewPlr.Name)
print(GamePlayers)
end
game.Players.PlayerAdded:connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerLeft)
What I want:
local GamePlayers = {
'63il',
'Player1',
'Player2'
}