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

Roblox chat 'Filtering' is breaking at random points?

So I constantly get errors on my chat at random points

http://puu.sh/qi8xI/47529b52ee.jpg -- Errors

The errors just stop the script entirely(which is expected), and I'm not sure what causes it.

It's whenever the players chat and the messages are filtered - it errors.

filteredMessage = ChatService:FilterStringAsync(message, sender, player)

is the line it errors at.(message/sender/player are defined before it already.)

What is causing the error, and can I do anything about it?

1 comment

1

ROBLOX Filter is fairly buggy at the moment but they proclaim they will be fixing it. Make sure to create your own filter.

1 answer

✓ Accepted answer

create ur own filter

local cuss = {"****", "****", "damn", "crap"} -- etc
function filter(msg)
for i,v in pairs(cuss) do
if msg == v then
return true
end
end
return false
end
game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(function(msg)
if filter(msg) then
Player:Kick("Please do not cuss in game!")
end
end)
end)

hope this helps

6 comments

2

You're censoring "crap"? How dare you!

0

xD. I dont know, I was just trying to give examples @wfj

0

I know this is very specific - but is there any way to check the entire sentence for those words rather than just people saying one thing? Because that seems easily bypassable.

0

Some people use something else, I use String:match([String pattern here])

0

I'd enjoy making the list of cusses

0

Please do not use profane or vulgar language on the site.

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