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

How do I detect when someone chatted something specific?

Like for commands or something. But you can just tell me how it detects it part ik how to do the rest.

1 answer

✓ Accepted answer

You just set up a .Chatted listener for every player as they join your game

Ex:

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(msg, recipient)
		if msg == "command" then
			-- code 
		end 
	end)
end)

You can look into string patterns for more advanced techniques.

1 comment

0

You should debounce the recipient.

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