Problem with local server and tables

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)

You only print the 1st part of the table. Print the whole table and it should show everyone. Also, in local test servers, all of the players names range from Player1 - Player8, so it should be able to record them as separate instances.

1 Like

Again my inability to reread strikes me! Thank you lots.