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 Messages In A Custom Chat System?

Hello, everyone.

I am currently working on my own chat system, but I cannot figure out how to implement a chat filter to it. If anyone could help, it'd be much appreciated.

Here's a small snippet of code from my chat system:

		newMessage.Text = plr.Name ..": ".. msg

3 comments

0

What have you tried doing for the filtering so far? Roblox has a function for filtering strings, but it requires both the sending player and the receiving player. http://wiki.roblox.com/index.php?title=API:Class/Chat/FilterStringAsync

0

I've tried using the ROBLOX chat filter, but when I do, it gives me the "Missing 3rd argument" and I only have the player and the message. I'd much rather use a custom chat filter that scans the message for any words that are bad and blocks them.

1 answer

HI there!

Create a remoteevenrt with FilterStringForBroadcast, it's for when everyone can see it.

local filteredText = game.Chat:FilterStringForBroadcast(msg, plr)

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