This member cannot be used in scripts, but is usable in the command bar.
Players event fires when a player chats.
The value of the
Enum/PlayerChatType determines the type of chat sent. There are three types of chat:
|All||A global message that everyone can receive.|
|Team||A team message only players in the same team can receive.|
|Whisper||A whispered message only the person it’s whispered to can receive. If the chat type is a Whisper Chat, the targetPlayer is the player being whispered to.|
Note that this event is not intended for wide use and will not work in
The type of chat. Either all, team, or whisper.
The player chatting (sending the message).
The message being chatted.
The player receiving the message if the chat is a whisper.
This example demonstrates that the
Players/PlayerChatted event fires when a player chats in the game by printing the player and the message chatted using the PlayerChatted parameters.
This example will function as expected when executed in the command bar.