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

How can i make this script function correctly(trying to end round for a minigame)?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
function check()
local red = 0 
for i,v in pairs(game.Players:GetPlayers()) do
    if a.TeamColor == BrickColor.new("Bright red") then
        red = red + 1
    end
end
if red == 0 then
endgame1()
end

local blue= 0 
for i,v in pairs(game.Players:GetPlayers()) do
    if a.TeamColor == BrickColor.new("Bright blue") then
        blue = blue + 1
    end
end
if blue == 0 then
endgame2()
end
if game.Workspace.Countdown.Message.Text == ("00:00:00") then
endgame3()
end
wait()
check()
end
check()

i would like for it to keep looping and for it to be a function because i want to be able to call it during my main function thanks!

1 answer

Log in to vote
0
Answered by 10 years ago

Just add the repeat the until and the variable when you want it to stop.

0
Tried it and it doesn't work raymandon 0 — 10y
Ad

Answer this question