Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Change gui for everyone in the game?

Hi,

I just want to check. If I wanted to change the GUI for everyone in the game, would this be my best option? I am using it for a Minigame that needs to change the gui.

for i,v in pairs (game.Player:GetPlayers()) do
v.PlayerGui.ScreenGui.TextLabel.Text = 'This is a test'
end

please do note that I am typing this in chrome so if there is any error, I apologize ahead of time.

1 answer

✓ Accepted answer

Your best option would be making a RemoteEvent in ReplicatedStorage, then call :FireAllClients() on it to let the clients know what to do. (it takes arguments so with that you can specify actions)

Then on every client you put a LocalScript which gets these OnClientEvents and manipulate the GUIs themselves. This follows the idea of the client servermodel.

Tutorial on Remotes: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial

(but the way you do it now would also work if FE isn't on c;)

1 comment

0

Thanks! I am going to be honest. I forgot all about FE. Thanks! - Happy Halloween

This discussion is preserved as it was. New answers, comments, and votes are closed.