Updating a gamewide GUI from a ServerScript

I’m trying to make it so when an event happens (pretty much anything), it will update on ALL the player’s screens. Such as if I wanted to put an image of a cat on everyone’s screen using a ServerScript, how would I go about doing so?

I am not using a LocalScript as I want this to be server sided so all players may see it. If it is possible to make this client sided, I would love to look into it.

Thanks in advance.

2 Likes

You can use remoteEvent for doing this. It as a function called :FireAllClients() which will fire the event to all the clients in the game. If you wanted to transmit a, text, let’s say, you can do it like this:
Server script:

local event = YourEventLocation

event:FireAllClients("Hello World!")

Local Script:

local event = YourEventLocation

event.OnClientEvent:Connect(function(text)
    print(text)
end)

Hope this helped!
-pranvexploder. :smiley:

What do you mean by “YourEventLocation”?

By “YourEventLocation”, I meant that you need to locate where the remoteEvent is.

local event = game:GetService("ReplicatedStorage").EVENT_NAME

Where “EVENT_NAME” is the name of your RemoteEvent in ReplicatedStorage.

Oh, I was overthinking it. Thanks!

2 Likes