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

How can I make it so that if someone says they hate my game in the chat, they get kicked?

Asked by 3 years ago

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.

0
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). Benbebop 1049 — 3y
0
Fine k i'll change it. What if I wanted it so that people can't say that they hate other players? photo_DracoTEST 12 — 3y
0
@Soban06 got to it before me. Use his method. Benbebop 1049 — 3y
0
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 botw_legend 502 — 3y

2 answers

Log in to vote
1
Answered by
Soban06 410 Moderation Voter
3 years ago
Edited 3 years ago

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

Ad
Log in to vote
0
Answered by 3 years ago

Well, to start off, this is not a very good idea for two reasons.

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

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

Answer this question