Hello, Devforums!
I want to make it so when I type something into a GUI textbox, it transfers to a SurfaceGUI text.
I found a script and modified it a little, but I keep getting one error I don’t know how to fix.
It says:
“Unable to assign property Text. string expected, got Instance”
I tried contacting the scripter, but nothing so far.
I also tried googling, searching on the Devforums and youtube, etc.
Here are the scripts.
–Local script in the GUI textbox–
local MyRemoteEvent = game.ReplicatedStorage.MyRemoteEvent
local MyTextBox = script.Parent
MyTextBox:GetPropertyChangedSignal("Text"):Connect(function(txt)
MyRemoteEvent:FireServer(txt)
end)
–Script in the ServerScriptService–
local MyRemoteEvent = game.ReplicatedStorage.MyRemoteEvent
local MySurfaceGuiTextLabel = game.Workspace.P2.Table2.Sign.SurfaceGui.SIGN
MyRemoteEvent.OnServerEvent:Connect(function(TextThatWasSent)
MySurfaceGuiTextLabel.Text = TextThatWasSent
end)
If I need to show anything else, just tell me and I will.
Thank you in advance!