TextChatService+

TextChatService+


image


What is it?

This script uses the utilizes the new TextChatService to add prefixes (chat tags), name colors (classic or chosen), and chat colors (in the future). The customization allows for you to assign these to players, groups, gamepass owners, badge owners, team players, players with a tag, and players with an attribute.

Quick Note

This is a proof of concept and is not yet fully optimized. I just wanted to get it out as quickly as I could so that people could have a reference.

How do I add it?

The standalone version can be found here: TextChatService+ - Roblox

If you are using Rojo, you can clone the repository or add it as a submodule: https://github.com/azutreo/roblox-text-chat-service-plus

Demo

Change Logs

Known Bugs

  • Chat colors do not work with bubble chat
  • There is no way to change the color of the : after a player’s name

TODO

  • Add the ability to set nicknames
  • Create documentation
  • Clean up the script and clarify comments
  • Better marketing (logo, banner)
  • Optimizations
47 Likes

I got beat by 9 hours @ericplane. The disadvantage of work amirite :smile:

2 Likes

When you have a school holiday and nothing to do you tend to have lot’s of freetime. :wink:

3 Likes

That looks really cool! It would look even cooler in my group’s hangout!

1 Like

Github link not works probably you forgot at private

Edit: Great job btw

2 Likes

Sorry about that! Fixed ahaha.

Thanks a lot! Until the documentation is released, I’ll definitely be experimenting with this.

I am working on an improved version (also renamed) that will be easier to configure and will have a small optimization. Plus it will allow for future updates by switching to a variety handler system for incoming messages, dependent on if it’s a player, system message, and so on.

Update 1.1.0


Changes

  • Renamed to TextChatService+ (I have to admit inspiration from TextChat+)
  • Reorganized the modules within the script
  • Created system message handler
  • Created global configuration options
  • More configuration options for prefixes, name colors, and chat colors
  • Minor optimizations
  • Easier support for future updates

Bug Fixes

  • The entire script was a bug :beetle:

Demonstration Video

This video is a mess. I am sorry you have to witness this. I am just a programmer; I don’t do marketing. aaaaaaaaaaaaa sorry.

Hi, I have a question. Is there support for UiGradients for chat tag & name color? If not, could you add support for it?

2 Likes

I will definitely include that in the next update!

Nevermind. I just realized I there is no gradient option for rich text and I can’t add a UIGradient object to the prefix text label because Roblox doesn’t expose that to developers :frowning:

This looks really cool, hoping to use it in my new game!

Damn nice name wonder where that came from :wink:

1 Like

Always gotta site sources :wink:

You bet, that’s a nice source.

1 Like

Cool.
Few things:

  1. Does this not support multiple prefixes?
  2. For the client (only) there’s a 1s delay applying the actual colour and prefix to the message, is that just me?
1 Like
  1. It does not, at this moment, no. I may add that in the future if Roblox intends to continue support for this new chat system (they have not made any updates in a while).

  2. This is not just you. Unfortunately, Roblox shows the message before extra data has been calculated and added in order to make it “feel responsive” (their words) however that makes it look really ugly when applying prefixes and such. In the legacy Roblox chat, it applied everything BEFORE making the message visible. More information can be found in this post New Beta In-Experience Chat System for Channels, Filtering and More! - #155 by be_nj

1 Like

Could you calculate the prefixes before the chat message is sent? Like when the player joins the game or a text channel? Yielding within OnIncomingMessage is supported but not ideal since it will delay the rendering of the message arbitrarily.

1 Like

I could try that, yes. The only reason I didn’t is to recalculate if someone gets a badge, buys a gamepass, joins a group (although this is cached weirdly anyway on Roblox’s end).

The more optimal way would be to do it once and leave it, much like the legacy Roblox chat does with ExtraData.

I may do it for this reason + performance reasons (recalculating after every message is a bit ehh).

I believe do have a cache though that it won’t “recalculate” the game passes, badges, and group for 30 seconds at a time.

1 Like

You could save your “ExtraData” as attributes on the TextSource or Player object. When the player connects you could write to asset ownership and group membership as attributes and update these attributes if needed during the game session.

Your OnIncomingMessage hooks would simply read from these attributes.

We recommend this because if this information is important enough to show before each chat message, it likely has some tangible gameplay implications as well, and confining that information in a chat&specific context would not let you easily reuse that information (it would have to be stored external if chat anyway)