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

How do I find the text of a TextBox using a RemoteEvent?

Asked by 3 years ago

This might be a little confusing, sorry! :|

I don't know how to find an object in a GUI using a script in ServerScriptService.

(This is an admin panel that only allows specific players access, which makes this harder for me)

The script does an OnServerEvent, so that when the button fires the event, it does the specific code and supports FilteringEnabled.

Here's my code:

game.ReplicatedStorage.ChatMakeMessage.OnServerEvent:Connect(function(player)
    print("System message event was fired!")
    bc = BrickColor.new("Institutional white")
    game.StarterGui:SetCore("ChatMakeSystemMessage", {
        Text = player.PlayerGui:WaitForChild("Administration").ActualPanel.messageBox.Text;
        Font = Enum.Font.GothamBold;
        Color = bc.Color;  
    })
end)

I've tried doing game.StarterGui.Administration as well, Nothing works

0
ChatMakeSystemMessage is only callable on the Client. Fire the Remote from the Client, authorize from the Server and disperse via :FireAllClients(). Ziffixture 6913 — 3y

Answer this question