File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
content/en-us/reference/engine/classes Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,23 @@ 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+ TextChatService.OnIncomingMessage = function(message: TextChatMessage)
18+ -- deriving TextChatMessageProperties
19+ local properties = TextChatService.ChatWindowConfiguration:DeriveNewMessageProperties()
20+
21+ -- changing color of messsage
22+ properties.TextColor3 = Color3.fromRGB(255, 121, 121)
23+
24+ -- setting message's chatwindowmessageproperties
25+ message.ChatWindowMessageProperties = properties
26+
27+ return properties
28+ end
29+ ```
30+
1431code_samples : []
1532inherits :
1633 - Instance
You can’t perform that action at this time.
0 commit comments