When a user enter texts in a Textbox and click on 'Submit' button, the same text appears on a SurfaceGui called "Surface GUI2", but when I enter inappropriate words, they don't get hashtagged and people can see the inappropriate words appearing on the SurfaceGui
This is server-sided script inside 'Submit' button, the game is not Filtering Enabled by the way -
function onButtonClicked()
game.Workspace["Surface GUI2"].SurfaceGui.Frame.Frame.TextLabel.Text = script.Parent.Parent.TextBox.Text
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
Also, on the ROBLOX Wiki there is an example of a text input GUI, I tried using that but it says "FireServer can only be called from the client"...
local Chat = game:GetService("Chat")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local sign = game.Workspace.Sign
local setSignText = ReplicatedStorage.SetSignText
-- Fired when client sends a request to write on the sign
local function onSetSignText(player, text)
if text ~= "" then
local filteredText = ""
local success, message = pcall(function()
filteredText = Chat:FilterStringForBroadcast(text, player)
end)
if success then
sign.Top.SurfaceGui.TextLabel.Text = filteredText
end
end
end
setSignText.OnServerEvent:Connect(onSetSignText)

4 comments
In studio nothing gets filtered. but you have to use game:GetService("Chat"):FilterStringForBroadcast(String Message, Instance PlayerFrom)
I know I tested the GUI in server mode
i don't see any filtering in your own script. (the top one)
That was the script I used in the first place, which didn't filter any text. Then I tried using remote event in the second script but it still didn't work ;c