Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to change text on a TextLabel for everyone?

Asked by 4 years ago

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)
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 royaltoe 5144 — 4y
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. royaltoe 5144 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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

Ad

Answer this question