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

How do I change every player's GUI at once?

Asked by 7 years ago

I know this seems simple, but I can't figure out how to fix it. The loop only changes each player's GUI one at a time.

for i, v in pairs(game.Players:GetPlayers()) do

    for i = GameTime, 1, -1 do
    v.PlayerGui.ScreenGui.Frame.TimeLeft.Text = "Time left: " .. i
    v.PlayerGui.ScreenGui.Frame.Frame.Minigame.Text = "Minigame: " .. game.Workspace.Value.Value
    wait(1)
end
v.PlayerGui.ScreenGui.Frame.TimeLeft.Text = "Game over!"
v.PlayerGui.ScreenGui.Frame.Frame.Minigame.Text = "Intermission"

end

1 answer

Log in to vote
0
Answered by 7 years ago

The reason for your problem is because you are running a separate loop for each player. You need to have it run for every player by giving them each their own script to do this and having them all wait for the same thing to change to start the loop

Ad

Answer this question