Answered by
4 years ago Edited 4 years ago
I don't know what you're scripting or how your game is setup but humanoids have a Died event which you could use.
You're going to need:
1 | table.remove(NameOfTable, PositionInTable) |
The only problem I see is that you are going to need to find the player's position in the table, I haven't tested this but maybe try:
01 | game.Players.PlayerAdded:Connect( function (player) |
02 | player.CharacterAdded:Connect( function (char) |
03 | char.Humanoid.Died:Connect( function () |
05 | for i, v in pairs (game.Players:GetPlayers()) do |
07 | table.remove(YourTable, i) |
If you want an explanation on how this works then I'll be happy to give one.
Hope this helps!