Respawn When Everyone Else Has Died
Options
How do I go through each player on the server and check if they are dead and if everyone else is dead then the match will restart? Thankyou.
I'm guessing it will need a foreach loop or something to go through each player but I am unsure how to do this.
I'm guessing it will need a foreach loop or something to go through each player but I am unsure how to do this.
0
Answers
-
what you can do is make an Integer counter and make it equal to the playerCount of the room and as soon as one player dies you just increment it , and when it reaches the playerCount means everyone is dead and you can start the respawn , you'll have to factor in if a new player joins or drops/leaves but I guess this will be a start , good luck0