So.... I want to make filter from Russians Words (because some filtering is not take)
And I can't make string.lower() Where's my error?
local Black_list = { ["???????? ????"] = true, ["???????? ?????"] = true, ["???????? ???"] = true, ["???????? ?????"] = true, ["???????? ???????"] = true, ["????????"] = true, ["???????? ????"] = true, } local TeleportService = game:GetService("TeleportService") game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Message) if Black_list[string.lower(Message)] then print("Is bad word") else print("Not bad word") end end) end)
You are doing string.lower() in the index of a dictionary. Try this:
local Black_list = { ["???????? ????"] = true, ["???????? ?????"] = true, ["???????? ???"] = true, ["???????? ?????"] = true, ["???????? ???????"] = true, ["????????"] = true, ["???????? ????"] = true, } local TeleportService = game:GetService("TeleportService") game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Message) local LowerMessage = string.lower(Message) if Black_list[string.lower(LowerMessage)] then print("Is bad word") else print("Not bad word") end end) end)