Hey.. I'd like to know how to make a UI visible for EVERYONE in the server. I did it a few times. But I literally did something with remote events, I don't know how I did it. Thanks!
COMMUNITY QUESTION
How do I make a UI visible for everyone in the server?
2 answers
To make a GUI Visible for all players, you can use 'FireAllClients', just like JesseSong said.
Server Sided Script:
local Event = EventPath:WaitForChild("EventNameHere") -- RemoteEvent
-- Do whatever
Event:FireAllClients() -- Fire this to every player.
Local Script (In the GUI Object):
local Event = EventPath:WaitForChild("EventNameHere")
Event.OnClientEvent:Connect(function()
script.Parent.Visible = not (script.parent.Visible) -- Toggle it on or off, depending on its current state.
end)
You can use a remote event with :FireAllClients like JesseSong and oilkas stated. If you don't know how to use RemoteEvents, I suggest checking this page: Remote Functions and Events
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Use fireallclients