Hi, I’m a new scripter and I’m just experimenting with RemoteEvents to learn client-server interactions. However, my script isn’t working as when I put a word into the TextBox, the SurfaceGui just reads back as “TextBox”.
Here’s the code in the normal Script:
local text = script.Parent.TextBox
local target = game.Workspace.SignPart.SurfaceGui.TextLabel
RemoteEvent.OnServerEvent:Connect(function(player)
if player then
local update = text.Text
target.Text = update
end
end)```
And here's the code in the LocalScript
```local button = script.Parent.TextBox
local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
local function onFocusLost(enterpressed)
if enterpressed then
RemoteEvent:FireServer()
end
end
button.FocusLost:Connect(onFocusLost)