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

Filtering Bad Content-Please Help?

The script I have written so far is below. What I am trying to do is to make a filter when User says a certain word, they will be kicked.

However, it is not working. Please help.

Filtered = {'Word1, Word2, Word3'}
game.Players.PlayerAdded:connect.function(p) --I think I messed up here or on the line below this.
p.chatted:connect(function(msg)
for i,v in pairs(Filtered) do
if string.find(msg:lower(), v:lower()) then
p:Kick()
end
end)

Thank you for help!

1 comment

1

You forgot to capitalize the 'C' in 'Chatted', remember, .lua is case-sensitive so you have to type it exactly how it's programmed or else it will not work.

1 answer

✓ Accepted answer

You need to capitalize C in chatted and also you need to remove the . between connect and function.

2 comments

0

Thank you!

0

Your welcome! :)

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