Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to script a chat detection? that kicked players out of the game for saying something word

I was making my own chat detection script alone in my game

The chat detection detects someone's saying something

Example: [Bot]: want free?

The chat detection detects the word is free it kicked players out of the game

I would like to know it please? I was asking nicely :)

23 comments

0

You can only do that on Custom Chat

0

When bot says free the Server announcement says: [Server Announcement]: Daddy_Francisco has been kicked for saying "free" word

0

Sir OriginalOrNot, Please close this guy's question his question is not allowed please moderate his question link here: https://scriptinghelpers.org/questions/101605/how-to-make-infinite-moving-road-please-help-me-im-poor-scripter

0

Wow nshow your a really bad person for doing that on an innocent person's question

0

Who's innocent person?

0

I was stopping him to ask that question about moving road script just like kumihari's vibe train moving tunnel script i was angry over him

0

Why were you trying to stop him? It's a normal question and don't forget that all game makers receive inspiration from other games. That's how roblox works.

0

Francisco was a real fucking toxic at looking programming school like this and lua learning

0

Francisco was a real fucking toxic well his question is closed as not constructive XD

0

WHAT THE FUCK!? my reputation CAUSE OF YOU

0

You're a real toxic sir that's why your reputation is poor sir cuz ur question is not constructive

0

Fuck you then those fucking contributors hates me now :(

0

Yeah nobody cares if you ask about kumihari's moving railway script so that's why contributors hates you

0

YOU FUCKING BASTARD

0

Ok boomer

0

FUCK YOU dude thanks to you my rep is -10

0

Yeah contributors and scripters will never help you cause moderators hates you

0

FUCK YOU BRO YOUR QUESTION WILL CLOSE

0

Nah this question will not close THIS IS CONSTRUCTIVE don't be toxic fran before moderator will perm ban ya

0

You are not innocent francis you are TOXIC that's why moderator closed ur question :P

0

FUCK YOU ASSHOLE!!!!!!!!! >:(

0

Chill out man. When is my answer going to get accepted?

1 answer

So what you want to do is you want to use the player.Chatted event and the :Kick() method. This will only work in server script for what I know.

Server Script

local Players = game:GetService("Players")

local function onChatKick(player)
	player:Kick("You used a word which is not allowed in this game")
end

local function chattedEvent(player)
	player.Chatted:Connect(function(msg)
		if string.lower(msg) == "free" then
			onChatKick(player)
		end
	end)
end

for _,player in pairs(Players:GetChildren()) do
	chattedEvent(player)
end

I'm so sorry if this didn't work. I tried and I don't have studio open right now so I can't check whether what I did works or doesn't. If there are any problems here feel free to comment on this answer and tell me your problem. I can try to fix it for you.

Thank you.

1 comment

0

Dang it nshow you are suspended THEN WHAT THE FUCK HAPPENED TO MY REP

This discussion is preserved as it was. New answers, comments, and votes are closed.