Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to change text on a TextLabel for everyone?

When a cashier in my cafe clicks a TextButton in their GUI to submit an order, how do I make it change the text for EVERYONE? It works in a LocalScript just for the client, however, I want everybody (or, preferably just the chefs) to see the order appear on the TextLabel, so they can make it. Currently, this LocalScript is inside StarterGui, inside a ScreenGui, inside a ScrollingFrame, inside a TextButton.

player = game.Players.LocalPlayer
 
script.Parent.MouseButton1Click:connect(function()          
    player.PlayerGui.ScreenGui.OrderCurrent.Text = "Milkshake"
end)

2 comments

0

When the cashier clicks the item they want to submit, send a remote to the replicated storage with the name of the item as a parameter. Then, from the server, call another remote that fires all clients (FireAllCients). When that remote is fired, In a local scrip inside the current orders gui, add that order to the localplayers order gui

0

if you havemt used remotes before / find this confusing, feel free to mention me in the scripting helpers discord. username there is royaltoe as well.

1 answer

Make It Into A 'Script' Not 'LocalScript'. Hopefully This Works

This discussion is preserved as it was. New answers, comments, and votes are closed.