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

Filtering Bad Content-Please Help?

Asked by 9 years ago

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
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. TheeDeathCaster 2368 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

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

0
Thank you! JustGimmeDaBux 18 — 9y
0
Your welcome! :) TroytheDestroyer 75 — 9y
Ad

Answer this question