Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to filter the chat using ROBLOX's chat filter?

1 answer

You should use :FilterStringForBroadcast().

local txt = "Hello, this message is being filtered!"
local plr = --Insert who inserted this text.

function FilterText() --This should be in a pcall, as sometimes this may error, as it makes a web call.
	game:GetService("Chat"):FilterStringForBroadcast(txt, plr)
end

local s, m = pcall(FilterText)
if not s then
warn('Filtering this text got an unexpected error.')
end

This discussion is preserved as it was. New answers, comments, and votes are closed.