Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
ChatCallbackType
Enumerates the callback hook points available in the legacy Luau chat system. Pass a value to Chat:RegisterChatCallback() to bind a function to the corresponding event, and to Chat:InvokeChatCallback() to invoke the registered function for that event. Each value targets either the client or the server; attempting to register a server-only callback on the client (or vice versa) raises an error.
Items
| Name | Value | Description |
|---|---|---|
| OnCreatingChatWindow | 1 | Client-only callback invoked before the chat window is constructed, allowing custom settings to be supplied. |
| OnClientSendingMessage | 2 | Client-only callback reserved for when the client sends a message; not currently invoked. |
| OnClientFormattingMessage | 3 | Client-only callback invoked before a message is displayed, allowing its display data to be modified. |
| OnServerReceivingMessage | 17 | Server-only callback invoked when the server receives a message from a speaker, allowing the message to be modified or suppressed. |
OnCreatingChatWindow
Client-only callback invoked before the chat window is constructed, allowing custom settings to be supplied.
| Field | Value |
|---|---|
| value | 1 |
OnClientSendingMessage
Client-only callback reserved for when the client sends a message; not currently invoked.
| Field | Value |
|---|---|
| value | 2 |
OnClientFormattingMessage
Client-only callback invoked before a message is displayed, allowing its display data to be modified.
| Field | Value |
|---|---|
| value | 3 |
OnServerReceivingMessage
Server-only callback invoked when the server receives a message from a speaker, allowing the message to be modified or suppressed.
| Field | Value |
|---|---|
| value | 17 |