Customized Chat, Giving a second life to the old beloved chat

The old chat looks old right? Well, not anymore!
image

The old chat looks old and outdated, and with the release of the new TextChatService, there should be no reasons to use the old chat. But one advantage the old chat has (and what caused it’s “demise” from developers abusing it from what I understand) is that the old chat is FULLY (or almost, idk) scripted in lua, in game.
image
It even has a very convenient module script containing a bunch of settings anyone can easily change, including some cool features like being able to resize the chat and drag it around!
image
However, the settings module will only get you so far, it becomes a lot more interesting when we modify the modules responsible for creating the chat frames, mainly these two modules:
image

What I have done is add some UICorners to the main frames, changed the font, changed the transparency so it matches the color of the top bar and added more properties into the settings modules. I have modified the channel tab frames and the resize frame aswell.


Since the time I have written this post, I have added more things to the chat. Believe it or not, Roblox engineers added support for Chat Translation to the legacy chat, it’s just not enabled. In this custom version of the chat, Chat Translation is enabled by default

I have also added support for Font Objects, which are far more customization than their Enum.Font counterpart. They allow for more variations of existing fonts in studio, or use of these 81 new fonts in the Creator Marketplace


(Enum.Font is still supported)

Other changes were made, listed in the list below


Updates

Replaced the deprecated draggable property that was used with a custom drag function
New features (Font objects, Chat Translation & more!) and bug fixes
Implemented :CanUserDirectChatAsync()


How to install

If you are feeling courageous, you can modify it yourself :wink:

Otherwise, here is a module containing the little changes I made

Put the scripts inside Chat (you can deleted read me)
image
(README contains info on how to get the Chat object to show in the explorer)

Make sure you set TextChatService.ChatVersion to LegacyChatService
image

And now, when you play, it should look like this
image


This is it! This isn’t anything revolutionary but I felt like this could be useful to many people. You can customize it quite far and make it really fit into your game if you know what you are doing. This is the chat in my game:
image
I had to change the tweening the tween the image transparency instead of the background transparency which was a bit of work, but on the other hand, there isn’t really a limit to how you can customize it, since all the code is there and ready to be modified.

Hope this has been useful for at least one person :wink:

51 Likes

This is really amazing because some developers prefer the legacytextservice and so this module might be what people wanted.

The only thing I would say is the padding between the box of the chatbox, and it’s chat messages inside the box
image

I think it’s customizable from the looks of it as it’s a module, so idk

1 Like

This is genuinely amazing! I personally like the new TextChatService because of its look, but in terms of actually using it, not so much. The scaling is off for some reason, among other things and much of my game’s feedback was to remove it. This would really provide benefits!

3 Likes

It sure is!
image

I added a UIPadding object to the background frame, in this module,
image
right here under the UICorner I already added

This doesn’t seem to be messing with the scrolling or anything

1 Like

YOOO Nice!, I didn’t think you’d do it but HEYY NICEEEE i love it!

It’s really amazing!

2 Likes

PLEASE Support “emoji chat suite”.

1 Like

emoji chat suite works fine with the customized chat (I tested just to be sure). You can use it just as you would with the default chat


However, the resize window gets moved to the bottom right for some reason (if enabled) and the default position of the chat is moved back to the edge of the screen sadly. Those are issues with the emoji chat suite as both issues are from features included with the default chat (when modifying these two values in the settings module)
image - Change this to (0,0,0,0)
image - Keep this to false

The customized chat is exactly the same as the default chat with the exception of the settings module (that has more settings and different ones) and some modifications to other modules to add up corners and stuff, so it’s still almost exactly like the default chat

1 Like

Heyyy, I’ve got a little update for the modified chat!

I basically updated the model to remove the draggable property from it, and replace it with custom dragging. No more odd behaviour from draggable when resizing and dragging the chat around, the chat also cannot be dragged off screen anymore, the position gets snapped

Also added padding to the ChatBox in the module from the marketplace, as commented by the first post here. (acutally, I don’t know if that was already the case before I updated it…)

1 Like

It looks weird. It makes me feel like I am playing a simulator game. (I associate rounded corners with simulators)

3 Likes

The settings module includes settings for the corner radius
The customizable nature of the old chat makes it really easy to modify it to your liking (unless you want to make it textured like I did in my game, you have to mess in the other modules)

I don’t really see the parallel with simulators, I tried to make it look like the other Roblox core gui (well mainly the top bar buttons). Everyone has different preferences I guess

2 Likes

pretty nice.
i generally like tinkering with old chat more than new. its simply lower level than new chat service (lower level as in able to edit chat more indepth)

3 Likes

You are right, I didn’t see the padding when I used the module from marketplace which got me questioning but man I really love this amazing creation of yours!

Also great update too.

Oh wait I didn’t see this, I was just gonna say you should add support for the newly added dropdown menu for emojis but you already did it!

Removing the all/team tab doesnt add life to it. Its still a broken mess of a chat

1 Like

Any plans to support GuiService.PreferredTransparency and/or GuiService.ReducedMotionEnabled? Also your custom drag function (that replaced the deprecated GuiObject.Draggable) freezes Studio on my laptop forever…

That would be a good thing to add, I’ll see about adding that. I don’t think that would be very hard to add

The default chat doesn’t have any motion to begin with, so idk what that would do

I don’t see how that is possible…


I’ll need more information to figure out what causes this, because to me it’s seems literally impossible for the loop to freeze studio

	ChatResizerFrame.MouseButton1Down:Connect(function() 
		
		if not ChatResizerFrameDraggable then return end
		BaseFrameDraggable = false
		
		local BaseFramePosition = BaseFrame.AbsolutePosition
		
		local InitialMousePosition = UserInputService:GetMouseLocation()
		local InitialFramePosition = ChatResizerFrame.AbsolutePosition
		
		while UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and ChatResizerFrameDraggable do 
			
			RunService.RenderStepped:Wait()
			
			local MousePosition = UserInputService:GetMouseLocation()
			local Difference = (MousePosition - InitialMousePosition) - BaseFramePosition
			
			local AbsolutePosition = InitialFramePosition + Difference
			ChatResizerFrame.Position = UDim2.fromOffset(AbsolutePosition.X,AbsolutePosition.Y)
			
			UpdatePositionFromDrag(ChatResizerFrame.AbsolutePosition)
		end
		
		BaseFrameDraggable = ChatSettings.WindowDraggable
	end)
	
	BaseFrame.MouseButton1Down:Connect(function() 
		
		if not BaseFrameDraggable then return end
		
		local screenGuiParent = GetScreenGuiParent()

		local InitialMousePosition = UserInputService:GetMouseLocation()
		local InitialFramePosition = BaseFrame.AbsolutePosition

		while UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do 

			RunService.RenderStepped:Wait()

			local MousePosition = UserInputService:GetMouseLocation()
			local Difference = MousePosition - InitialMousePosition

			local AbsolutePosition = InitialFramePosition + Difference
			AbsolutePosition = Vector2.new(math.clamp(AbsolutePosition.X,1,screenGuiParent.AbsoluteSize.X - BaseFrame.AbsoluteSize.X),math.clamp(AbsolutePosition.Y,-(GuiService.TopbarInset.Height+2),screenGuiParent.AbsoluteSize.Y - BaseFrame.AbsoluteSize.Y))
			BaseFrame.Position = UDim2.fromOffset(AbsolutePosition.X,AbsolutePosition.Y)

			doCheckSizeBounds()
		end
	end)

This code starts at line 229 in the ChatWindow Module script (inside ChatMain, inside ChatScript)
Does it cause a script timeout error? If so, please send a picture of the error

Chat translations do work on the old chat!
Here is how to get it working: In-Experience Text Chat Translations - #98 by Tomi1231

The LegacyChat has the translation system built in, what is required to get it working is overwriting a variable set by a FFlag (which will probably be true soonish) and having a BoolValue named “ChatTranslationEnabled” set to true

I looked at the scripts from this custom chat module, and they seem to have all the translation stuff already in them (surprisingly, from the update I did in november). It might be outdated though, I didn’t check that. Might update the module just to be sure, the scripts concerned aren’t the same as the ones I have modified

I personally don’t like the new textchatservice as ChatMakeSystemMessage doesn’t work, and it’s the text is tinier and harder to read. (I have glasses)

That literally why I had to remove it, the text was too small and everyone in the test server was complaining.

I have identified the issue to be coming from the deferred signal behaviour
image
(On workspace, set SignalBehaviour to Immediate and it should work. However, Immeditate is supposed to be removed eventually, but seeing how many things deferred breaks, I hope they just never roll out deferred signals)

I don’t have a fix for it yet, and the fix might come after a big update to the module. I’ll have to change some stuff in the code, because deferred signals strait up break a part of the script, which needs to be done in another way
(Edit, or I might be able to defer the change of a variable, that might work)

1 Like