Old Chat System - LegacyChatSystem converted to TextChatService API

Yooo this is awesome i hope theres a finished version of this because it looks really good!
(also that it doesnt cut off NPC dialogue like legacychatsystem does for some reason)

The NPC dialogue part is a core script and it would be hard to make a one-size-fits-all solution for that, it just hasnt been updated in 8 years so the bug in an engine update that made bubble chat need patched broke that too

1 Like

May upgrade this to include the current backpack when that gets phased out

Forgive me for not testing this myself before posting this, I just don’t have the means to test it right now.

The legacy chat system had issues on mobile (for me, anyways. With a relatively old phone), one of which being an issue with text wrapping. Sometimes when the final word or two of a message landed outside the right-side edge of the chatbox, instead of text wrapping to the next line, those words were cut off completely.

I don’t remember off the top of my head if this has been an issue with the new TextChatService system, I don’t think it has. But would it be safe to assume your resource won’t reinstate those old legacy issues? Or at the very least, the text wrapping issue? Is this mainly for visuals or legacy functionality too? i.e. no emoji list, command previews, etc.

(Bubble chat would still show the entirety of the message, it’s just an annoying bug regardless. Especially when the person you’re trying to read messages from isn’t nearby and their message is cut short.)

1 Like

This is quite literally just the backend being changes slightly so it probably has those issues if it didnt start before 2016/2017 (and wasnt caused by lua updates with no chat fixes)

if you give me an accurate reproduction instructions thing I can try and fix it if it exists as I did no know of the bug

Sorry for the late-ish reply.

Reproducing the issue using Legacy chat is pretty easy. You can test it with various NPCs with different length names (although name length shouldn’t matter, it still helps tests), have them send a message in chat that’s a random length (aiming for messages that would typically be close to the point of dropping to a new line), and if it happens to land in that bug’s sweet spot, it should occur and cut off the ending of their message in the chatbox.

If it doesn’t, then I’d say it’s safe to assume it won’t happen with your resource (at least until someone gets it and reports it). I’ll give it a test whenever I can get the time. But if you also get the time, it’d probably be worth testing it out yourself as well.

Edit: Here’s a thread from 2019 that addressed the bug I’m referring to. Has a prime example screenshot and helpful information on the bug.

Update!

The chat window now supports transparency accessibility settings!

Small update:

  1. Removed output spam when in studio
  2. Displays displaynames in chat (still can’t /whisper them)
  3. confirmed it still works with the new topbar

Update!!!

  • Fixed a few bugs
  • All SetCore and GetCore functions now work!!!
    This means you can use ChatMakeSystemMessage and ChatBarDisabled
  • You can now make your game BubbleChat only

Do there is a way to just get the old bubble chat?

yeah, remove references to the chat module in the script
unless you mean bubble chat only mode
to get that you disable classic chat in the attributes

if someone need just the old bubble chat then here is the script for this

local tcs = game:GetService("TextChatService")
local uis = game:GetService("UserInputService")
local players = game:GetService("Players")
local player = players.LocalPlayer
--tcs:WaitForChild("ChatWindowConfiguration").Enabled = false
--tcs:WaitForChild("ChatInputBarConfiguration").Enabled = false

if tcs:CanUserChatAsync(player.UserId) then
	local bubblechat = require(script:WaitForChild("BubbleChat"))
	

	tcs:WaitForChild('BubbleChatConfiguration').Changed:Connect(function(prop)
		if prop == "Enabled" then
			script:SetAttribute("BubbleChat", tcs.BubbleChatConfiguration.Enabled)
		end
	end)
	script:GetAttributeChangedSignal("BubbleChat"):Connect(function()
		tcs.BubbleChatConfiguration.Enabled = script:GetAttribute("BubbleChat")
	end)
	local function isUDim2Value(value)
		return typeof(value) == "UDim2" and value or nil
	end
	local function isBubbleChatOn()
		return not script:GetAttribute("ClassicChat") and script:GetAttribute("BubbleChat")
	end
	
	
	
	tcs.OnIncomingMessage = function(msg)
		bubblechat(msg)
	end
else
	game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
end

Bump! You can already switch back to LegacyChatService in the service “TextChatService”

image

are you able to make the whispering work?

If you click the chat bar then click off it stays big. Other than that this works fine!

New update:

  • Fixed a race condition I found that leads to chat erroring and not working if it loads before the new topbar (never happens with the old topbar since it completely loads before game scripts start)

Is TextChannels with commands possible with this?

Kinda, channels outside of team and general arent implemented but commands work fine

Theres a chance this system WILL need to get updated in your games by at least January when I work out a fix for relying on a few legacy APIs (if roblox actually provides replacements to get your own chat button which I feel they won’t)

I may have to end up relying on TopbarPlus and completely “disabling” chat with SetCoreGuiEnabled which will break any script relying on SetCore to customize the chat system but will bring better performance since ExperienceChatMain will be disabled

Because roblox is roblox, you’ll most likely have to update ~January (though I’ll most likely migrate this to a package to make future updates and fixes easy)

Pushed an update to move chat icons to TopbarPlus v3 and now Chat is always “disabled” with SetCoreGuiEnabled (may improve performance)

1 Like