TextChatService+

I do like that. I may rewrite the script then for those performance optimizations. This version was written very hastily and didn’t really have much care put into it, to be honest.

1 Like

Update 1.2.0


Changes

  • Cached “ExtraData” when player joins, when team updates, when attribute updates, when they are added/removed from a CollectionService tag, or every 10 seconds (by default)
  • Minor optimizations for performance; messages now show very quickly.

I briefly looked over your github repository and noticed you have a different code path for Sending and Success messages:

Shouldnt your sending handler also read the attributes like the Success one? I think that may be the artifacting that you’re seeing.

1 Like

:person_facepalming:
You are, in fact, correct. The reason I separated sending and success is because I found it weird that it was happening in the first place. But I should just use the same function for both… :laughing:

1 Like

lol, no worries. happens to the best of us :smile:

7 Likes

Where do I place it in studio?

Is there a way to change the font depending on what group rank they are or if they have a gamepass?

Also, I found a bug while using this. Whenever a player joins it errors, the error is attempt to index nil with Group. Although the error doesn’t actually break anything it still isn’t nice for the developer console to be spammed. Not sure if it’s cause I set something up wrong of if it’s something wrong with the system.

Here’s an image of the full error:

how do i set this up idk how to do this!

Is there a reason the video is now private? Not really sure how to use this; as far as I can tell it’s a LocalScript with some modules underneath and no ready way for developers to interface with it.

Well, I suppose there’s this:

but at first glance I’m seeing no functions to interface with here in order to apply that data.

Setting the attribute on my own doesn’t appear to work either:

Server:

game.Players.PlayerAdded:Connect(function(player)
	player:SetAttribute("ChatData_PrefixText", "Owner")
end)

image

image
(attribute automatically replicates to the client)

Nevermind, there just needed to be a prefix color as well:

game.Players.PlayerAdded:Connect(function(player)
	player:SetAttribute("ChatData_PrefixText", "Owner")
	player:SetAttribute("ChatData_PrefixColor", "FF0000")
end)

image

I would suggest that if no prefix color is specified, have your script either use a default color or just error to inform the developer it’s required.

I’d also add that Roblox now allows you to remove the colon from the TextChatMessageProperties.PrefixText.

I understand if you do not intend to maintain this project, but otherwise I hope this helps. I am currently writing some literature about TextChatService functionality, and I’m working through modules like this to see how developers have been using it.

Thanks!

Aye, this is a very outdated module that is based on when the service was first released. I haven’t been able to maintain it due to restrictions with my job (a non-compete that applies to open source).

I have been wanting to re-make it in a more proper and up-to-date way, but I just haven’t been able to :frowning:

I went ahead and made the video unprivate (I made all the videos in my channel private and it affected that one).

Thank you, I will check the videos out. You may see I linked your thread here from a thread I spent the past day writing up.

How am I supposed to set priorities? I’m the owner but also own a gamepass, so on one player’s screen it displays the owner prefix while on my screen it displays gamepass prefix

Please update this, we really need it.