In result of text not being filtered correctly, ROBLOX took moderation action and resulted in our game to be taken out. Below is our main game chat system script with filtering system (I think). I wont include the variables from the events to keep our game secure and with hold security. However the only thing I just added was Enum.TextFilterContext.PublicChat in the end of the filter statement
Below is the two points we have with text input on our custom chat UI, one being a standard output for bubble text and another being a radio system where users text can be outputted onto.
If anyone has any ideas, if the message below is getting filtered correctly now and wont result in our game being held in ROBLOX Moderation.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local TextService = game:GetService("TextService")
local ChatService = game:GetService("Chat")
local MessageTabCreation = require(ReplicatedStorage.Modules.UI.Radio.MessageTabCreation)
local XPDataHelper = require(ReplicatedStorage.Modules.Shared.TeamXP.XP_DataStoreHelper)
local messageEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Radio"):WaitForChild("Message")
local TransmittingMessageEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Radio"):WaitForChild("TransmittingMessage")
local function getFilteredMessage(fromPlayer, text)
local success, result = pcall(function()
local TextFilterResult = TextService:FilterStringAsync(text, fromPlayer.UserId, Enum.TextFilterContext.PublicChat)
return TextFilterResult:GetNonChatStringForBroadcastAsync()
end)
if success then
return result
else
warn("Filter failed for player", fromPlayer.Name, ":", result)
return string.rep("#", #text)
end
end
TransmittingMessageEvent.OnServerEvent:Connect(function(player, status, callSignValue, deptShort, message, currentChannel)
if status ~= "radiotransmit" then return end
local filteredMessage = getFilteredMessage(player, message)
local PlayerXP = player:WaitForChild("Leaderboardstats"):WaitForChild("XP_Folder"):WaitForChild("TeamXP").Value
local PlayerRank = XPDataHelper.GetRank(PlayerXP):gsub("_", " ")
TransmittingMessageEvent:FireAllClients("publishtest1", callSignValue, deptShort, filteredMessage, currentChannel, PlayerRank, player)
end)
messageEvent.OnServerEvent:Connect(function(player, status, message)
if status ~= "standardtransmit" then return end
local filteredMessage = getFilteredMessage(player, message)
local character = player.Character or player.CharacterAdded:Wait()
local head = character:FindFirstChild("Head") or character:WaitForChild("Head", 5)
if head then
ChatService:Chat(head, filteredMessage)
else
warn("Player's character head missing; cannot display chat bubble")
end
end)
If its not this filter system above its probably another call point in the game. For example our callsign input
local function FilterCallsign(player, text)
local success, result = pcall(function()
return TextService:FilterStringAsync(text, player.UserId)
end)
if not success then return nil end
local filtered
success, filtered = pcall(function()
return result:GetNonChatStringForBroadcastAsync()
end)
if not success then return nil end
if filtered == "" then return nil end
return filtered
end
If someone could help out it would be greatly appreciated



