Our messaging system in our game is not working as intended due to a ROBLOX issue, causing text to be lost before and after transit because of the filtering that we do.
It doesn’t error at all, it just returns “” only.
So far this is consistent, I have grabbed the filtering code from the main game and put it into one of my places for testing, and it’s produced the same results
To be clear this method is partially deprecated, but ONLY on the client. We do not filter on the clientside, this is all server code.
local stringtofilter = "testing"
local ts = game:GetService("TextService")
local function getTextObject(message, fromPlayerId)
local textObject
local success, errorMessage = pcall(function()
textObject = ts:FilterStringAsync(message, fromPlayerId)
end)
if success then
return textObject
end
return false
end
local function getFilteredMessage(textObject, toPlayerId)
local filteredMessage
local success, errorMessage = pcall(function()
filteredMessage = textObject:GetChatForUserAsync(toPlayerId)
end)
if success then
return filteredMessage
end
return false
end
task.wait(3)
local userid = game.Players:GetPlayers()[1].UserId
local TextObject = getTextObject(stringtofilter,userid)
print(TextObject)
local FilteredString = getFilteredMessage(TextObject,userid)
print(FilteredString)