This update is really good. New UI is only part of it, new exposed APIs that I can mess around with really opens up more possibilities
If I switched to the new chat system and want to switch back how do I do this?
I’ve been waiting so long for this!
Looks so much cleaner and modern.
The chat gui doesn’t disappear when i stop hovering on it unlike the old chat system
Are there a any legitimate reasons as to why coreguis below the topbar are always misaligned? Seeing as newer stuff are still following this trend I’d thought I’d ask. ocd not fun
How do you fork the ChatWindow’s UI as well as the ChatInputBar’s UI?
It’s in CoreGui
now.
You can enable it by going to Studio Settings.
For TextChatCommands
, is there support for commands with multiple arguments?
The new UI is located in CoreGui > ExperienceChat (I think its only there on runtime)
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)
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.
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.
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?
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:
-
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)
-
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.
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 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.