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

How to change guis all at once?

Asked by 10 years ago

This script only changes each player's gui one at a time. How do you change the text of everyone's gui all at once?

function countdown()
    local players = game.Players:GetPlayers()
    for i = 1, #players do
        players[i].Character.Humanoid.NameOcclusion = Enum.NameOcclusion.OccludeAll
        local stats = players[i].PlayerGui.fullGui.everything.gamePlay.informer
        local spawn = game.ServerStorage.WeaponSpawns:Clone()
        spawn.Parent = Workspace
        stats.Text = '3'
        wait(1)
        stats.Text = '2'
        wait(1)
        stats.Text = '1'
        wait(1)
        stats.Text = 'Begin!'
        stats.FontSize = 'Size48'
        wait(2)
        stats.Text = ''
        wait(1)
        stats.Text = 'Objective: Find a weapon. '
        stats.FontSize = 'Size36'
    end
end
countdown()
0
wait(1) sounds like a second to me. maybe wait(0.1) could be helpful legoson7 70 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

I answered your question on the Roblox Forums >.>

Learn how to use Coroutines. They allow you to execute code like seperate scripts: http://wiki.roblox.com/index.php?title=Beginners_Guide_to_Coroutines

Ad

Answer this question