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

Public gui with user input?

Asked by 9 years ago

What's the best way to go about creating a screen gui that can be manipulated by everyone in the server? There's no server gui, is there?

0
You might have to have to use a "reference" GUI (or just some value objects/in-script variables), so that a script could replicate its data to each player's GUI. Redbullusa 1580 — 9y
0
That's what I thought. I'll have to use coroutines and loops then aquathorn321 858 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I would recommend using a RemoteEvent for this. Specifically because of the FireAllClients method.

So for example: A gui that everybody can edit and it syncs across all players.

local RemoteEvent = Workspace.Event

script.Parent.Changed:connect(function(l)
    if l == "Text" then
        RemoteEvent:FireAllClients(game.Players.LocalPlayer.Name,
            script.Parent.Text)
    end
end)

RemoteEvent.OnClientEvent:connect(function(Player,Arg)
    script.Parent.Text = Player.." says: "..Arg
end)
Ad

Answer this question