Stopping game when all players die/stop function when all players die? [SOLVED]
Asked by
5 years ago Edited 5 years ago
Solution: So first of all, thanks to fredfishy for trying to help me out, but I didn't use their solution. I used another method and tried it and it worked. (basically used int values and did a loop of the time until the int values was changed, which was when all the players on the playing team died, which is kinda weird but it was easier for me to understand)
I'm making this one game where basically you survive until the round ends or when all the players die.
(also there's two teams: Playing and Out, I already made it that the players change teams when the game stops/starts)
I only scripted when the round ended, the game ends.
The part where I'm confused, however, is how to end the game when all players on the "Playing" team die and to stop the timer and game when that happens?
(the clocktimethingy is an int value that corresponds to the timer in the game)
01 | local function startGame() |
02 | status.Value = "Intermission" |
03 | clocktimethingy.Value = 20 |
05 | if clocktimethingy.Value ~ = 0 then |
06 | clocktimethingy.Value = 0 |
08 | status.Value = "Game is starting!" |
11 | status.Value = "Game currently in progess..." |
14 | clocktimethingy.Value = 45 |
16 | if clocktimethingy.Value ~ = 0 then |
17 | clocktimethingy.Value = 0 |