I would like to test the filtering in text service, but I don’t know how. I though “love” was a good test word, but it doesn’t get replaced by ###.
Is there a keyword that I can use to test the experience filtering without risking some kind of moderation flagging of my account?
Code is simple enough:
local filteredText
if player then
-- if obby belongs to a player, set the player's display name as default name of the obby
filteredText=player.DisplayName
-- for user obbies, filter the name for forbidden words
if signText and string.len(signText)>0 then
local filteredTextResult:TextFilterResult
local success, errorMessage = pcall(function()
-- allow 1-15 characters
filteredTextResult = TextService:FilterStringAsync(string.sub(signText,1,15), player.UserId,Enum.TextFilterContext.PublicChat)
end)
if success then
filteredText=filteredTextResult:GetNonChatStringForBroadcastAsync()
else
warn("Error filtering text:", signText, ":", errorMessage)
end
end
else
-- obby name comes from script, will not be filtered
filteredText=signText
end