local function filterAllResults()
for i,v in pairs(game.Players:GetChildren()) do
local PlayerId = game.Players:GetUserIdFromNameAsync(tostring(v))
_G.finishedStuff[v].prompt = textFilter.Public(_G.finishedStuff[v].prompt, PlayerId )
for ii, vv in pairs(_G.finishedStuff[v].story) do
vv = textFilter.Public(vv)
end
end
end
local TextService = game:GetService("TextService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local module = {}
function module:Filter(ogText, playerId)
local filteredText = ogText
local success, result = pcall(function()
filteredText = TextService:FilterStringAsync(ogText, playerId)
return filteredText
end)
if success then
return result
else
return filteredText
end
end
return module
it filters everything. I thought it worked because when I tested it was filtered, but because it uses rich text to make it have colors (or I think that’ought to be the reason) it censors everything no matter what
local TextService = game:GetService("TextService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local module = {}
function module:Filter(ogText, Player) -- # Instead of sending Player UserID Send the Player Instance.
local filteredText = ogText
local success, errorMessage = pcall(function()
filteredText = TextService:FilterStringForBroadcast(ogText, Player)
return filteredText
end)
if not success then warn("Had issues filtering message. " .. errorMessage) reutrn end
return filteredText
end
return module
Try this, I haven’t had any issues when using FilterStringForBroadcast.