The VisibilityStateChanged signal, used with StarterGui:SetCore("CoreGuiChatConnections", containerTable) fails to update the visibility status of the chat in the topbar. With the LegacyChat (well, what is a modified version of), this results in the topbar chat button breaking, when the LegacyChat tries to set it to be visible (when using the hotkey to focus the chatbar)
While the LegacyChat is now deprecated, StarterGui:SetCore("CoreGuiChatConnections", containerTable) is still very useful for custom chats looking to integrate directly into the topbar
Note that, I think, this started happening around April of this year (while the LegacyChat was being phased out), and I remember the default LegacyChat having issues. I can’t confirm this, as I am unable to test with the stock LegacyChat. I’m also guessing a little about how this system is supposed to work, as I cannot use an older version of studio to test how it is supposed to behave, and there is no documentation about it. I am relying on the LegacyChat code to infer the expected behavior
If the chat is closed, and you try to open it by using the hotkey, it still thinks the chat is closed while it isn’t, but moreover, it’s in an odd state, where clicking the topbar button is also broken, meaning it is now impossible to truly “open” it
(At the end of the video, I try to click on the chat button to “open” it, and I also press é to (re)focus the chat, even though it is already focus, but that doesn’t magically fix it)
It is easier to see, in a repo I made. This repo also has the case where the button tells the topbar that the chat is closed (something the LegacyChat cannot do by default), and this does actually work at getting the topbar button out of its glitched stuck state
Repo file: CoreGuiChatConnections_bug.rbxl (63.7 KB)
A workaround I’ve found is to use StarterGui:SetCore("ChatActive", IsVisible) and the VisibilityStateChanged signal
System information:
– Windows 10
– Ryzen 5 5600G (integrated graphics)
– 16Gb drr4 ram 3200MHz
Expected behavior
I expect the VisibilityStateChanged signal, from StarterGui:SetCore("CoreGuiChatConnections", containerTable), to correctly update the status of the chat icon and notifications on the topbar