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

Roblox chat 'Filtering' is breaking at random points?

Asked by
3dsonicdx 163
7 years ago
Edited 7 years ago

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
ROBLOX Filter is fairly buggy at the moment but they proclaim they will be fixing it. Make sure to create your own filter. ikiled 75 — 7y

1 answer

Log in to vote
2
Answered by
ikiled 75 Donator
7 years ago
Edited by M39a9am3R 7 years ago

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

2
You're censoring "crap"? How dare you! User#11440 120 — 7y
0
xD. I dont know, I was just trying to give examples @wfj ikiled 75 — 7y
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. 3dsonicdx 163 — 7y
0
Some people use something else, I use String:match([String pattern here]) Vezious 310 — 7y
View all comments (2 more)
0
I'd enjoy making the list of cusses Dolphinous 36 — 7y
0
Please do not use profane or vulgar language on the site. M39a9am3R 3210 — 7y
Ad

Answer this question