As filtering is a big part of Roblox, I had to create a script to filter stuff for display on a sign.
The text will pass through the script with no errors but it won’t filter (putting in really obvious things that would be filtered aren’t filtered).
Here is the script, maybe I am missing something?
local rs = game:GetService("ReplicatedStorage")
function rs.DisplayStuff.AskForFilter.OnServerInvoke(plr, msg)
local textObject
local TextService = game:GetService("TextService")
local success, errorMessage = pcall(function()
textObject = TextService:FilterStringAsync(msg, plr.UserId)
end)
if success then
local filteredMessage
local success2, errorMessage2 = pcall(function()
filteredMessage = textObject:GetNonChatStringForBroadcastAsync()
end)
if success2 then
return filteredMessage
else
return "Error: Failed to filter: "..errorMessage2
end
else
return "Error: Failed to filter: "..errorMessage
end
end