Hello, I’m trying to find a if a blacklisted word appears in a chat message and if found deletes it. Currently, I have this:
local blacklistedwords = {"robux", "free"}
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(message)
for i,v in pairs(blacklistedwords) do
if message:Find(string.lower(blacklistedwords[i])) then
-- delete message
end
end
end)
end)
Thanks!