Trying to filter the textbox response from the GUI. This is here making a label, what label? Basically what this does is make a block and a Billboard GUI to label things. On line 62, I tried to add a filter but to no avail as users can place swear words.
SERVERSCRIPT
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Label1 = Instance.new("RemoteEvent", ReplicatedStorage)
Label1.Name = "LabelGUI"
--Code runs
local function Establishment(player, Text)
local char = player.Character
--Setup name. Creation
local mod = Instance.new("Model")
local part = Instance.new("Part", game.workspace)
local GUI = Instance.new("BillboardGui", part)
local GUIText = Instance.new("TextLabel", GUI)
--Set BRICK PROPERTY
part.Size = Vector3.new(0.5,0.2,0.5)
part.CanCollide = true
part.Transparency = 0
part.Name = "Head"
part.Locked = false
part.Anchored = true
part.BrickColor = BrickColor.new("Gold")
part.Material = Enum.Material.Neon
part.Archivable = true
part.CastShadow = false
part.Name = "Label"
--Location/Spawn set
mod.PrimaryPart = part
mod.Parent = char
mod:SetPrimaryPartCFrame(char.Head.CFrame+Vector3.new(0,1,-1.5))
mod:Destroy()
part.Rotation = Vector3.new(0,0,0) --Make sure that it does not look like a mess.
--Properties to the GUI
GUI.Enabled = true
GUI.ExtentsOffset = Vector3.new(0,4,0)
GUI.MaxDistance = 35
GUI.Name = player.name
GUI.Parent = part
GUI.Size = UDim2.new(0 ,200 ,0 ,50)
wait()
GUI.Adornee = part
--Properties to the text
GUIText.BackgroundTransparency = 1
GUIText.BorderSizePixel = 0
GUIText.Visible = true
GUIText.Font = Enum.Font.SourceSansLight
GUIText.RichText = true
GUIText.TextColor3 = Color3.new(255,255,255)
GUIText.TextSize = 14
GUIText.TextScaled = true
GUIText.TextStrokeTransparency = 0
GUIText.Parent = GUI
GUIText.Size = UDim2.new(0 ,200 ,0 ,50)
--Set it to Name thing
GUIText.Text = Text
end
Label1.OnServerEvent:Connect(Establishment)
LOCAL SCRIPT
local Insert = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Label1 = ReplicatedStorage:WaitForChild("LabelGUI")
Insert.MouseButton1Click:Connect(function()
--Light the transmitters
Label1:FireServer(script.Parent.Parent.TextBox.Text)
--Wait to reload to not spam out.
script.Parent.Visible = false
script.Parent.Parent.Reloading.Visible = true
wait(10)
script.Parent.Visible = true
script.Parent.Parent.Reloading.Visible = false
end)

2 comments
I found an error that says. Unable to assign property Text. string expected, got Instance. when using GUIText.Text = filteredMessage
Don't know where to add in the server script though!