How would I make displayed text become "Text" property of a surface GUI textbox?

I found a proper solution, while the main idea of using remote events was right, I had some other issues. To make all things work, I had to place local scripts in starterPlayerScripts folder. Instead of :GetPropertyChangedSignal I used :FocusLost.
This is how the scripts look:
Local:

local players = game.Players
local player = players.LocalPlayer

local textBox = workspace:WaitForChild("Screen").EditMenu.IndicatorX

local event = game.ReplicatedStorage.Events.GetTextX

textBox.FocusLost:Connect(function()
	local text = textBox.Text
	event:FireServer(text)
end)

Server:

local textBox = script.Parent

local event = game.ReplicatedStorage.Events.GetTextX

local function changeText(player, text)
	textBox.Text = text
end

event.OnServerEvent:Connect(changeText)
1 Like