I’m a little lost here, i’m currently making a game show stage and I need a way to make it so you can change the text on each little station to represent the name, with a control panel in a small gui so you can control it anywhere in the game.
I feel like this is easy but i’m just a builder i’m not smart.
You’ll need to make use of a RemoteEvent to achieve this. The remote event will be used from a local script to fire the server whenever the text in the Gui is changed, this server firing will then be handled by an OnServerEvent event from a server script which then modifies the text displayed on the sign.
--LOCAL SCRIPT--
replicatedStorage = game:GetService("ReplicatedStorage")
local signRemote = replicatedStorage:WaitForChild("SignRemote")
local textBox = script.Parent
textBox.FocusLost:Connect(function()
local text = textBox.Text
signRemote:FireServer(text)
end)
--SERVER SCRIPT--
replicatedStorage = game:GetService("ReplicatedStorage")
local signRemote = replicatedStorage:WaitForChild("SignRemote")
local signGuiLabel = script.Parent
signRemote.OnServerEvent:Connect(function(player, text)
signGuiLabel.Text = text
end)
The above waits for focus to be lost on a focused Gui element (textbox) and then sends whatever text is currently displayed within that textbox to the server, the server then sets the text displayed by the part (sign) to whatever text it received.
I was wondering how to do something similar, but what I don’t know is if it filters the text through the chat system or not. Does this filter the text already, or is there a method to do this?