So I have this script in my game, that when a certain button is clicked, the final sequence commences, and the exit of the facility is opened. When this happens, the “objective” TextLabel changes from “Objective: Find all the buttons.” to “Objective: Escape the facility.”
However, because StarterGui wasn’t working (for now understood reasons), I had to resort to using PlayerGui, which inadvertently caused the objective to only change for the player who clicked the button, while all other clients in the server stay the same.
In addition; when said player dies, the GUI resets to the old objective, instead of “Escape the facility.”
Just give me some ideas on how to make my script universally-friendly to all clients, and I’ll try to work it in my existing script. Thanks!
Make a RemoteEvent that is fired whenever the button is called. From the server, you can use RemoteEvent:FireAllClients() and pass the message to every client so they are all in sync.
If I’m understanding your question correctly, RemoteEvent:FireAllClients is what you’re looking for.
Make the client that completed the objective call FireServer on a RemoteEvent and then make the server call FireAllClients with the objective that was completed. Then all you have to do for each client is listen for that .OnClientEvent event and then update the TextLabel’s text accordingly.