Hey there, I’m trying to write a script to create a table for players currently in the game in order to have a round based teleportation system. The problem I’m running into is in order to test it I must run a local server in which all the characters are named Player1 and it seems to not want to add them to the table as separate objects. Am I doing this wrong? Am I just overwriting the player that just got added or is it just not registering that it’s a new player?
game.Players.PlayerAdded:Connect(function(plr)
table.insert(players, plr)
print(players[1])
end)
game.Players.PlayerRemoving:Connect(function(plr)
table.remove(players, plr)
end)