User:ArceusInator/hold

From Legacy Roblox Wiki
Jump to navigationJump to search
Chatted ( String message, Instance recipient )
Description Fired when the owning player types a chat in chat bar or selects a phrase in safe chat menu.
Member of: Player
Chatted ( Instance recipient, String message, ChatColor chatColor )
Description Fired when the Player uses a Dialog's UserDialog box to communicate with the Dialog
Member of: Chat


In Player

This event is fired whenever the player types in a chat bar or selects a phrase in the conversation pop-up. The msg contains the text from the chat box. In the case of the conversation pop-up, the msg contains "/sc " followed by the message code. The recipient argument is always nil.

Example
function onChatted( message )
   if message == "respawn" and game.Players.LocalPlayer.Character then
      game.Players.LocalPlayer.Character:BreakJoints()
   end
end

game.Players.LocalPlayer.Chatted:connect( onChatted )


In Chat

This event is fired whenever the player selects a UserDialog from their UserDialog box to communicate with a Dialog. As with the Player version, the recipient argument is always nil.

Limitations

Chatted must be used from Server-side scripts. It does not fire in LocalScripts.