How to hide a message if it contains a symbol/letter

How would I go about hiding a message if it contains a certain symbol/letter.

For example if it contained “;” then the message would go through but it would hide itself.



You would go in the roblox chat modules, and custom it. Would be hard to do that tho.

1 Like

This has been already asked, please read before creating a new topic.

This is how you do it:

local BlockedContent = {";"}

local function Run(ChatService)
	local function BlockMessage(speakerName, message, channelName)
		for _, keyword in pairs(BlockedContent) do
			if (message:find(keyword, 1, true)) then
				return true
		return false

	ChatService:RegisterProcessCommandsFunction("ChatMessageDestroyer", BlockMessage)

return Run

This is a picture of the explorer:


Basically this script stop processing the message if it contains a specific character

my game doesnt have chat modules in it, chat doesnt even have any children. How can I add it then?

By default the Chat service has no children as it fetches them every time a player joins for the client so that they are always up to date. You can obtain the current version of chat modules by playing the game in studio, in the Explorer expand the Chat service and copy the ChatModules folder, then stop the game and paste it in the Chat service.