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

Why is my intermission GUI not functioning properly?

Asked by 9 years ago
if game.Players.NumPlayers >= 3 then
for i = 30,0,-1 do  
    script.Parent.Text = ("Countdown" ..i)
end

elseif game.Players.NumPlayers < 3 then
    script.Parent.Text = ("Waiting for more players")
end
end

For some players, it does not update the text of the intermission. But if I add a While True Do, it messes up the countdown. Help please.

2 answers

Log in to vote
1
Answered by
Relatch 550 Moderation Voter
9 years ago
if game.Players.NumPlayers > 3 then
    for i = 30,0,-1 do  
        script.Parent.Text = "Countdown " ..i
        wait(1)
     end
else --This just needs to be "else" since it explains there needs to be more than 3 on line 1.
    script.Parent.Text = "Waiting for more players"
end
Ad
Log in to vote
1
Answered by
Thetacah 712 Moderation Voter
9 years ago

I didn't test it, but this should work

while(true) do
if game.Players.NumPlayers >= 3 then
for i = 30,0,-1 do  
    wait(1)
    script.Parent.Text = ("Countdown" ..i)
end

else
    script.Parent.Text = ("Waiting for more players")
end
end

Answer this question