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
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.