PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. Instead, you should go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar

WhisperChat

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 Player.

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.