How to make a submit text gui to a billboard

Hello there, for the last week i’ve been trying to make an announcements billboard but i couldnt manage to script the part where you submit and text appears on the billboard

I tried using ContentText propertie of the TextBox but it failed.

If you know a little can you comment to make a disscussion here about the ways we can fix this problem? :slightly_smiling_face:

Do you mean pressing the button and it appears on the BillboardGui in game or using webhook magic? I’m a little confused, sorry.

Here is a demonstration of what i tried to ask

Sorry if my english was a little bad :sweat_smile:

I don’t think it was bad. It’s not my first language, so I don’t read it well sometimes :sweat_smile:


Using a remote event to fire the server with the information in the text box should work just fine. I would clone a template of a frame on the server side of things.


Server Code (ServerScript in ServerScriptService)
local replicatedStorage = game:GetService("ReplicatedStorage")

replicatedStorage:WaitForChild("ServerMessage").OnServerEvent:Connect(function(player, text)
	local clone = script:WaitForChild("Template"):Clone()
	clone.Name = player.Name
	clone.TextLabel.Text = text
	clone.Parent = workspace.Part.BillboardGui
end)
Client Code (LocalScript in GUI)
local replicatedStorage = game:GetService("ReplicatedStorage")
local serverMessage = replicatedStorage:WaitForChild("ServerMessage")

local gui = script.Parent
local frame = gui:WaitForChild("Frame")
local submit = frame:WaitForChild("Submit")
local input = frame:WaitForChild("Input")

submit.Activated:Connect(function()
	serverMessage:FireServer(input.Text)
end)

input.FocusLost:Connect(function(enterPressed) --// Optional
	if enterPressed == true then
		serverMessage:FireServer(serverMessage.Text)
	end
end)

You’ll need to add a remote event into ReplicatedStorage named “ServerMessage”


You’ll also need to change the code accordingly to how your game is setup of course

Now I would like to ask what is Template in this script?
Is it a textlabel?

The template would be a frame with a text label in it, but it can just be a text label.

Just change line 6 in the server code to this if you make it a TextLabel instead: clone.Text = text

I would also highly recommend using TextService to filter the text on the server. Without it, anyone who uses it can send things not allowed by the chat filter normally, which could result in your game being taken down and possibly getting you banned or terminated

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.