Hey there! I’m making a custom chat system, and I am trying to filter text user the Chat service. The problem is, is that it doesn’t filter anything.
Here’s the server code (in StarterGui):
local chatService = game:GetService("Chat")
script.Parent:WaitForChild("FilterFunction").OnServerInvoke = function(player, message)
local filteredText = chatService:FilterStringForBroadcast(message, player)
task.wait(.1)
print(filteredText)
return filteredText
end
And here’s the client code (in StarterGui):
local filteredText = script.Parent.FilterFunction:InvokeServer(inputBox.Text)
textChatService.TextChannels.RBXGeneral:SendAsync(filteredText)
inputBox.Text = ""
How would I filter the text? Any help is appreciated!