I have a game, where there is a portal which you go in and i dont know how to make it check the players that go in so that it could check if they're all dead to restart the game. How can I do that. 1 code to make it put the players that go in, inside a list and then check if alive and restart if not.

I have the restart script. Whats the easiest way to do this?