of     1   

Ptwisted
#183667958Monday, February 15, 2016 2:52 PM GMT

Every time I want to change what the text label says, I have to iterate through every client so that all their text labels are the same. Is there a better way to do this to save code? function StartRound() local mgGui = Instance.new("ScreenGui") local frame = Instance.new("Frame", mgGui) frame.Size = UDim2.new(1, 0, 0, 40) frame.BackgroundColor3 = Color3.new(255/255, 85/255, 0/255) local textLabel = Instance.new("TextLabel", frame) textLabel.Size = UDim2.new(1, 0, 0, 40) textLabel.BackgroundTransparency = 1 textLabel.TextScaled = true textLabel.Text = "Get ready for a "..pickGame().." minigame!" local mgclone = mgGui:clone() local label = mgclone.Frame.TextLabel for _,player in ipairs (game.Players:GetPlayers())do mgclone.Parent = player.PlayerGui label.Text = "Test 1" end wait(3) for _,player in ipairs (game.Players:GetPlayers())do if player.Character and player.Character.Torso then label.Text = "Test 2" end end end
OzzyFin
#183668122Monday, February 15, 2016 2:55 PM GMT

you should be handling most of the stuff seen on client locally, especially GUIs use a remoteevent to tell all the clients to do this change to this GUI
cheesecake123456
#183668138Monday, February 15, 2016 2:56 PM GMT

Try having a premade mgGui and cloning it at the start
izzatnasruna
#183668275Monday, February 15, 2016 2:58 PM GMT

for _,player in ipairs (game.Players:GetPlayers())do mgclone.Parent = player.PlayerGui label.Text = "Test 1" end wait(3) for _,player in ipairs (game.Players:GetPlayers())do if player.Character and player.Character.Torso then label.Text = "Test 2" end end why not just for i,player in pairs (game:getService('Players'):GetPlayers()) do mgclone.Parent = player.PlayerGui label.Text = "Test 1" coroutine.wrap(function() wait(3) if player.Character and player.Character.Torso then label.Text = "Test 2" end end) end
Ptwisted
#183668328Monday, February 15, 2016 3:00 PM GMT

@izz Could you explain what you did there?
McGunz
#183671256Monday, February 15, 2016 3:46 PM GMT

@op I believe he gets all the players, goes into their PlayerGui and changes the text on there so all will see the same text.
Ptwisted
#183674266Monday, February 15, 2016 4:24 PM GMT

Do I need only one remote event to handle all the players, or should I have a remote event in every players starter pack?
OzzyFin
#183674879Monday, February 15, 2016 4:31 PM GMT

just one in replicatedstorage
Ptwisted
#183674924Monday, February 15, 2016 4:32 PM GMT

Thank you

    of     1