Hi everyone,
We’re excited to announce that the new in-experience text chat system is now available for public opt-in! This means that you can now turn on the new chat system in Roblox Studio and publish it live!
TextChatService is our new successor to the existing Chat service, and makes the process of managing channels, decorating messages, filtering text, creating commands, and developing custom chats easier than ever.
In addition, this system is more sustainable for engineers at Roblox to iterate on. It will continue to receive regular fixes & new features over time without conflicting with any code you may have written that uses it.
If you would prefer to make your own frontend GUI for chat, this should help streamline your development process by handling the chat boilerplate code for you.
TextChatService formalizes the sending and delivery of chat messages specifically within the Roblox engine and treats the data it receives appropriately with that context.
Think of this feature as the sum of two parts:
API
The most notable piece de resistance aspect of the next TextChatService is how TextChannel:SendAsync operates. SendAsync will handle all the important policy-abiding business logic that every Roblox experience must follow for developers.
Here is a laundry list of details that are automatically handled when using the TextChatService API:
- Text filtering
- Message size limits/rate limiting
- Respecting chat privacy settings
- Message replication
- Channel permissions
- Command logic
- Frontend
Default UI
In addition to the API, TextChatService can also optionally provide a default frontend chat UI for your experience. Instead of “forking” chat player scripts to tailor the default UI for your experience, we plan to expose formal Roblox APIs (see ChatWindowConfiguration and ChatInputBarConfiguration) to edit the look and feel of the chat. You can also disable the default frontend completely and still get the benefits of the new TextChatService instances for your own custom chat UIs!
Additionally, you can alter message styling without overriding our existing UI using OnIncomingMessage hooks and RichText tags - which means you can customize it to fit your experience.
We will actively continue iterating on this new in-experience text chat system to have more features!
We would love to hear about any and all feedback you have!
More information about documentation and how to opt-in are listed below:
How to Opt-In
First, go to Model → Service.
A box to insert service will appear. Scroll to the right to find TextChatService.
Select TextChatService, and you should now see TextChatService in your explorer:
Click on this and change the ChatVersion property from LegacyChatService to TextChatService. This will disable the old chat from loading by default, and enable the new system:
…and you’re done! If you have not forked the old chat system, you should not have to make any changes. If you have, you may run into some issues as missing chat modules will no longer be automatically loaded in.
Documentation and Resources
- You can find and search for API documentation here:
- In-experience Text Chat - A high-level guide to chat customization
- TextChatService - The top-level container for the new chat system. Chat objects must be parented under this.
- ChatWindowConfiguration - Created automatically and parented under TextChatService, controls chat window style/behavior.
- ChatInputBarConfiguration - Created automatically and parented under TextChatService, controls chat window style/behavior.
- TextSource - Represents a speaker in a TextChannel.
- TextChannel - Represents a text channel. Contains TextSources. Calling SendAsync from a client with a TextSource in that channel that has CanSend = true will send a chat message.
- TextChatCommand - When a message with a prefix matching the Primary or Secondary alias is sent, the Triggered event will fire on the sending client and on the server.
- TextChatMessage - Immutable data object used to represent a chat message.
- TextChatMessageProperties - When returned from the TextChatService.OnIncomingMessage or TextChannel.OnIncomingMessage callbacks, will overwrite the matching properties on the TextChatMessage. Can be used to add rich text tags to a message.
- The previous Studio Beta announcement: New Beta In-Experience Chat System for Channels, Filtering and More!
Changes from the Original Beta Release
Thanks to your feedback, we’ve made the following changes to the feature during the Beta phase:
- We’ve made the background transparency of the chat window lighter to better match the colors of other default Core UI.
- Player names are now colored by default when messages are sent to the default TextChannel (RBXGeneral).
-
StarterGui:SetCoreGuiEnabled
may be used to enable or disable the feature like other CoreGui UI.