I'm doing this to prepare for haters. So basically if they say something hateful towards my game like "This game is stupid" or "I hate this game" they get kicked with a custom message like "Please don't say anything hateful" or something.
How can I make it so that if someone says they hate my game in the chat, they get kicked?
2 answers
So first we need to check if the player chatted something. There is a .Chatted event. You will use it like this in this case:
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
-- do stuff with msg and player
if msg == "I hate this game!" then
player:Kick("Please don't say hate stuff.")
end
end)
end)
Although it shoudn't be like this. i.e People can say anything they want in the chat. Like @Benbebop said. But if you still want a way to do it. It is here. Hope it helps
Well, to start off, this is not a very good idea for two reasons.
There shouldn't be a need to do this. If people are criticizing your game A LOT, that means there is either something wrong with it or your playerbase doesn't like it. Most successful games / content creators take a lot of criticism, but even then they still succeed - if you have to filter people criticizing your game, that means that it is not a successful game. Censorship is only reasonable when it genuinely causes problems.
They can easily bypass the filter. There are many synonyms of hate, different ways of spelling it, etc.. if you put in every possible "hate" synonym and phrase, you are not only going to slow your game down but realize that you will also have to check for alternate spellings or bypass spellings, like"hete", which will pretty much slow down your game even more.
Having said that, the solution would be to do what Soban06 did, only make a table of keywords, and check for bypass spellings. Then you can kick those players.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
This isnt a way to run a game, people should be able to say whatever they want in chat (within the bounds of Roblox's rules).
Fine k i'll change it. What if I wanted it so that people can't say that they hate other players?
@Soban06 got to it before me. Use his method.
honestly this is hilarious and also its true that players should be allowed to say whatever they want, it should also be allowed that people can decide who they want to kick