I am making a racing game and I have a table, full of players currently in the race. If one of those players leaves the game will they automatically be removed from said table?
COMMUNITY QUESTION
If a player leaves a game are they automatically removed from any tables they are a part of?
1 answer
You could do this:
game.Players.PlayerRemoving:connect(function(oldplr)
table.remove(TABLENAME, oldplr)
end)
And I don't think they are automatically removed
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
They aren't. Assume nothing in programming is done for you, because most of the time it isn't. And your removeal code will only work if the table is a Dictionary. If it's just a list, you'll have to loop through it to find the player.