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

How to fix issues with FE GUI and remote events?

Asked by 4 years ago

So I am trying to make a game where you enter your nation's name in a text box then appears on a surface gui text label. It works fine without FE but now that I try to turn it into FE the text on the surface GUI just goes blank.

that's the script for the button which fires the event

local event = game.ReplicatedStorage:WaitForChild("Changetext")

script.Parent.MouseButton1Down:connect(function()
    event:FireServer()
end)

This is the script which does the things after the event has been fired:

local event = game.ReplicatedStorage:WaitForChild("Changetext")

event.OnServerEvent:connect(function()
    game.Workspace.nation.SurfaceGui.TextLabel.Text = game.StarterGui.SeatGUI.Frame2.TextBox.Text
end)

The Event is in replicated storage

1 answer

Log in to vote
0
Answered by
Lucke0051 165
4 years ago

You have to pass the text in the event, the text entered on the client is not replicated to the server.

Ad

Answer this question