New In-Experience Text Chat System Public Release!

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:

264x250

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:

517x32

…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.
368 Likes

This topic was automatically opened after 9 minutes.

This new text chat UI looks much more modern and I’m glad it got updated, good job Roblox!

51 Likes

Why are there no visual channels shown?

21 Likes

Daaaaam nice chat UI. Will the chat UI work for everything you can do with the chat API?

12 Likes

Are there plans to add the ability to re-position the chat UI? I was talking to an engineer (cc @be_nj) about it, and they said it was not yet supported.

12 Likes

When you mean visual channels, do you mean tabs for channels?
image

We are currently concocting feature ideas such as this and would be interested in allowing developers group to multiple channels to a single tab. While you could implement this already if you wanted to make a custom UI, if you have cool or interesting ideas for this we’d love to hear about it!

Short answer, yes there are plans to support this within a relatively short time frame.

39 Likes

Yep! That’s what I need. Also, since there is a AddUser function to a text channel, when can we receive a RemoveUser counterpart?

8 Likes

Good q, you can just call TextSource:Destroy() to remove someone from a channel right now.

9 Likes

I remember seeing this at RDC, I am so happy to see it here!! So many customization options too! (10x easier too!)

3 Likes

Yes! Finally! I can’t wait to try this, now that the documentation is finally here.

7 Likes

If you type /Team team chat will not work but if you do /team with a lowercase t it will work. You guys should make it so it does not matter if it is lowercase or uppercase.

In my opinion the old text chat looked a lot better because it looks more organized but the new one looks cool but weird

Over all I think the new text chat will get better over time.

5 Likes

Good job on this, looks a whole lot more sleek and modern. TextChatCommands seem very easy to implement, and could even be grouped by Folders or maybe even adopted by command frameworks.

I feel it is a little unfortunate that TextSources didn’t get chat tag support and instead the developer must manually concatenate it in a callback - writing RichText without some builder API is a pain. I enjoyed the simplicity of Speaker:SetExtraData() for chat tags.

6 Likes


There’s some issues with it. You can’t send a message after messing with it, I have the channels set manually and speaker is added on player added.
Edit: Player color is also not shown.

6 Likes

This is a pretty cool update. Hope to see every game using this. Good job Roblox engineers.

3 Likes

Do you mind creating a new thread for this? I can follow up more there. Feel free to ping me by name

6 Likes

This looks awesome! Excited to mess around with this!

2 Likes

Trying to figure out other ways to get around this since I’m fairly certain the GUI just isn’t registering being added to a channel.

2 Likes

That’s so cool!!! I am gonna use this for my game lol. Good work, roblox.

1 Like

So, to make our own chat GUI we just have to hook up the API functions/events to a ScreenGUI?

I’m kind of confused on what each linked resource does because their documentation is primarily composed of just inherited properties and repetitive info

5 Likes