WhisperChat
This member cannot be used in scripts, but is usable in the command bar.
For thread safety, this property is not safe to read in an unsynchronized thread.
Thisfunction delivers the given message to a recipient without anyone else seeing. Since this item is protected, attempting to use it in aScriptorLocalScript` will cause an error.
This function is used internally when the Players/LocalPlayer sends whispers another player.
If you would like to create a custom chat system where you can define custom functions such as these, take a look at the tutorial here.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
|
|
The message being chatted. |
||
|
|
The recipient |
Returns
| Return Type | Summary |
|---|---|
|
No return. |
Code Samples
Sending Whisper Chat
This example demonstrates that the Players/WhisperChat function executes without error if using the Command Bar or a Plugin and errors if executed in a LocalScript.
When executing the function, you must provide the message and the recipient’s Player instance. The code sends a whisper message from the Players/LocalPlayer to the recipient.