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

Change gui for everyone in the game?

Asked by 8 years ago

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

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

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;)

0
Thanks! I am going to be honest. I forgot all about FE. Thanks! - Happy Halloween MisterThackeryBinx 29 — 8y
Ad

Answer this question