How to change GUI from server

Hey guys I’m wondering how I would change the gui on the server.

Now before you go spamming To use a remote event you may want to fully read the post:

The issue with using a remote event to change the GUI is that I want to be able to change ANY gui. While a remote event can change a specific pre-defined GUI object, I want to somehow pass a reference through. And when trying to create a reference on the server, I face similar problems since I would have to do things like set the GUI with an attribute (which is not acceptable just as setting GUI from the server is not acceptable.)

Don’t create a reference on the server, make an identifier instead. Eg:

event:FireClient(player1, ‘changegui2’, Udim2.new(0,0,0,0))

1 Like

This is something thats supposed to be adaptable for games that arent my own. For this reason I cant pass through names since roblox allows developers to have objects with the same name.

make a centralized table and when a player joins they would send their entire screengui to the server, now you have a list of references for each player

1 Like

that doesnt sound very optomized nor practical in the sense you would have to constantly check for concurrency.

The server already has access to the newest version of the client inside of their playerGUi inside of their player model in game.Players[“PlayerName”].PlayerGui