Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To Filter Messages In A Custom Chat System?

Asked by 6 years ago

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
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 NotInventedHere 158 — 6y
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. TheRings0fSaturn 28 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

HI there!

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

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

Answer this question