I have a function that filters text however I would like it to not filter numbers and certain words. Is there a way to whitelist certain letters or words?

Here is my current function:

local function filterMessage(text, player)
	local filteredText
	local success, errorMsg = pcall(function()
		filteredText = ChatService:FilterStringForBroadcast(text, player)
	end)
	if success then
		return filteredText
	end
	return nil
end

Any help will be greatly appreciated!

2 comments

0

Thanks!