New In-Experience Text Chat System Public Release!

You can support a command with multiple arguments with the following snippet:

TextChatCommand.Triggered:Connect(function(textSource: TextSource, rawText: string)
    local words = string.split(rawText, " ")   -- words[1] will be the first argument, words[2] the second, etc
    -- do the thing!
end)
1 Like

As @TheRealANDRO said, it was just an example. In reality, if something like this was implemented, there would most likely be a small button for opening the channel bar.

2 Likes

Question about the metadata parameter on a couple methods (DisplaySystemMessage and SendAsync) for TextChannel. What exactly is it, and how would one fill it in?

The metadata is useful for setting some data in JSON(I think) for the message, for example if you want to tag a person you could set the metadata to “vip_tagged” and then you could retrieve it from the OnMessageReceived event.

But how would one use it? I, specifically, would like to set the colour and font of the message. How would I go about doing so?

You can decide to send an optional metadata with a message created by SendAsync or DisplaySystemMessage.

For example, we set the metadata tag for system messages from our “mute” command to either Roblox.Mute.Info.Success or Roblox.Mute.Error.CannotMuteSelf depending on the status of the command. Then our OnIncomingMessage hook for the default RBXSystem channel can color the text of the system message red if it sees Error in the metadata or grey if it sees Info.

You could also do this to attach some additional context to a message sent. For example, if you wanted to make someone’s text larger if they were a giant in your game, you could attach a metadata string with each of their messages sent from SendAsync:

textChannel:SendAsync(text, "isGiant")
textChannel.OnIncomingMessage = function(textChatMessage)
    if string.find(textChatMessage.Metadata, "isGiant") then
        -- make text bold or something
    end
end

Decorating system messages is probably a more common usecase and it can be done the same way:

 -- you could read textChatMessage.Metadata to color this text based on the reader's team affiliation
textChannel:DisplaySystemMessage(text, "RoundWon.TeamA")

We’ve updated our documentation to include some guides and examples! You can check them out here: In-Experience Text Chat | Roblox Creator Documentation

We’ll also update the original post to include this link.

1 Like

Currently unfiltered text has prefixes too. Adding triggered prefix in args would be nice.

How would I go on adding multiple chat tags at once?

I have a script for the old system that give users who have both a vip gamepass and Roblox Premium two chat tags.

Both of them are used at once.

How would I script that with the new TextChatService?

1 Like

Liking the look of the new chat system and the general improvements to a few common systems.

Two issues currently preventing us from adopting the new chat system in Club Roblox are:

  1. Need “RegisterChatCallback” or similar to be implemented so that we can monitor and intercept text chat messages from the server. An example of this use case is intercepting messages that we deem to have been sent by bots. (We have a few other important use cases similar to this)

  2. Text box focused event for typing indicators or typing indicators built-in by default for bubble chat.

Looking forward to being able to implement this fully once the above issues have been worked through. Otherwise really excited about the UI refresh and general improvements.

3 Likes

The new chat system looks very cool and modern! I will definitely be using this. However, while I was testing the new chat, I found some problems with the default chat ui.


1. The textbox for the chat bar is much smaller than the visual bar. This is annoying when you are trying to click on the chat if your mouse is too close to the border of the visible bar.
2. When using the “/” shortcut, there is a small but noticeable delay before you can actually start to type.
3. When you go over the maximum character limit, it doesn’t stop you from typing. When you send the message with more than the maximum characters, it just completely deletes your message.
4. When you close and open the chat using the :speech_balloon: button, the chat will be scrolled up to the top.
5. If you fill up the whole chat so a scroll bar appears, if you type a letter like “g” or “j”, part of the letter will be cut off.
6. The useful chat command “/clear” isn’t a feature.
7. Sometimes the chat messages disappear instead of the chat box when idle from it. (I don’t know what causes this and it only happened twice)
8. The chat box sometimes disappears for being idle even if your mouse is over it.
9. The colon after the player’s name is the same color as the chat instead of the color of the player’s name. This just is slightly confusing and annoying to look at.
10. You can type WAY too many messages before it makes you wait to send more messages.

5 Likes

It actually is in the demo too, just not in the image.

@be_nj Where ChatServiceRunner went?
Screenshot_20220702-110657

In your above screenshot, i can see ToriVPN, what is that?

ToriVPN is my Anti-Exploit script.

i like but if you snap it to the roblox gui then it will be perfect

2 Likes

this could be the new start for roblox to change although it might be slow progress

The LegacyChatService support R6 emotes but the new one doesn’t and Player.Chatted doesn’t fire, also please fix this

I really like the new UI! I have a question though:

With the legacy chat, there’s a method for creating chat speakers for non-players. Looking at the new AddUserAsync method, it seems this is no longer possible as you can only create speakers for players that are on the server?

For example, in my game, I have a Pizza Man who drives into the map to give deliveries to players. His messages appear in the chat too because I created a chat speaker for him with the legacy chat. It’s a small thing, but I think it makes him feel a lot more real and also lets players know that their deliveries are here when they’re not near the van.

Example image

1 Like

Came here because of a avatar editor game that had the text chat (not buble chat) different that what i remember in 2016-2022.

1 Like