New In-Experience Text Chat System Public Release!

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

To make your own GUI, you can set ChatWindowConfiguration.Enabled and ChatInputBarConfiguration.Enabled to false in Studio:

Then you can create your own text box to send messages:

local textBox: TextBox = createTextBox()
local chatInputBarConfiguration: ChatInputBarConfiguration = TextChatService:FindFirstChildOfClass("ChatInputBarConfiguration")

textBox.FocusLost:Connect(function(wasEnterPressed: boolean)
    local targetChannel = chatInputBarConfiguration.TargetTextChannel
    if targetChannel then
        targetChannel:SendAsync(textBox.Text)
    end
end)

Rendering messages takes a little more work, but you can do that by listening to events like in this pseudo-code:

local chatWindow: Frame = createChatWindow()

TextChatService.MessageReceived:Connect(function(textChatMessage: TextChatMessage)
    renderTextLabel(chatWindow, textChatMessage)
end)

12 Likes

I have a VIP game pass for my game but with the new text chat the tag does not work so how do I make the chat tag work?

1 Like

For help with something specific like this, feel free to ping me in a new thread in the Help and Feedback section since there will likely have to be some back-and-forth with this request!

5 Likes

It would be useful if TextChatCommands could be nested further than one descendant level down, so we could structure our commands like this

TextChatCommands
  AdminSystem
    Fun
      Zombie
      Noobify
    Administration
      Kick
      Ban
    Misc
      Version

currently, this wont work

12 Likes

Insanely awesome update - I love that Roblox is getting away from forking default scripts and instead allowing for seamless integration. This is a great display of futureproofing, and I’m really excited to see the subsequent updates to this. This provides a really cool flexibility that actually makes subsequent updates (hopefully) roll as “new features/developer options for the chat system” versus “global chat system changes”.

Here’s hoping the Animate script gets some love soon :slight_smile:

13 Likes

https://devforum.roblox.com/t/how-to-add-chat-tags-for-the-new-roblox-text-chat-service/1848913?u=charlie_april20

1 Like

What would be the best way of doing a ‘local’ channel? i.e for like a 20 stud radius, what’s the best way to utilize the channel with the new service?

1 Like

This update is really nice and I was able to update my public script accordingly without any issues. However, it is still annoying there is no ability to hide a message until I have fully “processed” it as a developer.

Under recommendation from @be_nj in this reply to my controller, I store everything required, such as prefix, name color, and so on, as an attribute to the player. In my script, all I do is read this attribute as a script, as with in this code snippet:

function PlayerMessageHandler:Success(message, properties)
	local player: Player = Players:GetPlayerByUserId(message.TextSource.UserId)
	if not Util.AssignmentOptions:CheckIsPlayerValid(player) then
		return properties
	end

	local prefixText = player:GetAttribute("ChatData_PrefixText")
	local prefixColor = player:GetAttribute("ChatData_PrefixColor")
	local nameColor = player:GetAttribute("ChatData_NameColor")
	local chatColor = player:GetAttribute("ChatData_ChatColor")

	properties.PrefixText = string.format(
		Configuration.PlayerMessage.NameFormat,
		message.PrefixText
	)

	if typeof(nameColor) == "string" then
		properties.PrefixText = string.format(
			Configuration.PlayerMessage.NameColorFormat,
			nameColor,
			properties.PrefixText
		)
	end

	if typeof(prefixText) == "string" and typeof(prefixColor) == "string" then
		properties.PrefixText = string.format(
			Configuration.PlayerMessage.PrefixFormat,
			prefixColor,
			prefixText,
			properties.PrefixText
		)
	end

	if typeof(chatColor) == "string" then
		properties.Text = string.format(
			Configuration.PlayerMessage.TextFormat,
			chatColor,
			message.Text
		)
	end

	return properties
end

The line Util.AssignmentOptions:CheckIsPlayerValid(player) does not yield as this is all it is:

function AssignmentOptions:CheckIsPlayerValid(player: Player)
	return typeof(player) == "Instance" and player:IsDescendantOf(Players)
end

The “delay” can still be seen in this video (ignore the music, I didn’t feel like muting it okay). Edit: The delay is no longer visible thanks to a bug being pointed out by @be_nj in this reply.

Are there any plans to add the ability to hide a message? Since it’s a UIListLayout, even the ability to make the TextLabel.Visible to false would be nice, however, we don’t even have that small amount of control.

5 Likes

It sounds like both of these ideas are converging on the same thought! Being able to hide particular messages with the default UI is something we are considering through the TextChatMessageProperties API.

Right now there is not a way to hide messages within the default UI. Of course you can decide to hide or filter messages based on proximity or TextChatMessageStatus with a custom UI but we’d like to enable this in the default case as well.

9 Likes

How do channels work? When this was in beta I could not see a way to have elective always-available channels that players could switch between on the fly (e.g. general versus roleplay-specific chat) because there was no documentation. Still cannot find anything of the sort. Was this feature dropped? I guess I can allow players to form chat groups (custom channels), but there’s no nice way to present this within the UI of the chat window, or to allow them to swap channels in a self-contained way. If there is I couldn’t figure it out.

Also it seems there’s no way to let players resize this chat? This is important in my game because roleplay involves a lot of chat history.

7 Likes

It’s great to see the new in-experience text chat system and new UI looks much better and the fact you get more customization with it. Good job and well done to everyone who worked on this new in-experience text chat system. I will definitely find some time to check out the documentation. Thank you for this release! :purple_heart:

4 Likes

Bug Report:

It appears I have the chat closed, but I can still hover over the area or chat icon:
image

When you double click to re-open the chat and close it, the normal behavior appears.

Also, it appears that ZIndex on a ScreenGui is not respected like the chat like the old one:

New Chat:

Old Chat:

I will not be opting in until these are fixed.

But other than that, really excited that this is now public! The chat has needed an overhaul to match the topper for 2 years.

8 Likes