File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
content/en-us/reference/engine/classes Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ description: |
1111 defined in `Class.TextChatService.OnIncomingMessage` or
1212 `Class.TextChannel.OnIncomingMessage`. This can be used to customize the
1313 appearance of a message with [rich text](../../../ui/rich-text.md) tags.
14+
15+ ```lua title='LocalScript - Retrieving and Using TextChatMessageProperties'
16+ local TextChatService = game:GetService("TextChatService")
17+
18+ TextChatService.OnIncomingMessage = function(message: TextChatMessage)
19+ -- Derive chat message properties
20+ local properties = TextChatService.ChatWindowConfiguration:DeriveNewMessageProperties()
21+
22+ -- Change color of message
23+ properties.TextColor3 = Color3.fromRGB(255, 121, 121)
24+
25+ -- Set chat window message properties
26+ message.ChatWindowMessageProperties = properties
27+
28+ return properties
29+ end
1430code_samples : []
1531inherits :
1632 - Instance
You can’t perform that action at this time.
0 commit comments