Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make the loop stop if everybody dies in the map, or everyone wins?

Asked by 6 years ago

Hello! I have a GameScript which runs all the time, and I am trying to make it so if all the players in the map die, or if the winners are greater than the number of players in my map, to stop running the loop, and go on to the next block of code. I have a folder that contains all the string values of the players names who are in the map there, and i have a folder that contains all the string values of the players that have won. How would I make this work?

for i = 200,0,-1 do
    status.Value = "In-game: "..i
    wait(1)
end
0
You'd need an [If Statement] then Inside a [break] - break just basically stops that loop from going on internally. The if statement should contain your script about if the players in the map die. xEiffel 280 — 6y

Answer this question