Is it possible at all to toggle the default chat menu on and off, without forking the chat scripts, when the chat’s core gui is disabled?
i.e. game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
As some context, I’m looking to re-create the newly proposed topbar, whilst maintaining full control over the design and functionality of these icons (excluding the Roblox menu icon).
SetCore has a function called CoreGuiChatConnections which you can use to control more aspects of the chat, such as firing Chatted or controlling the icon’s unread badge. It has a ToggleVisibility event which should be able to do what you’re asking for.
(dev hub has an example code for that SetCore at the very bottom of the page)
The page can be confusing in parts, although I believe I’ve setup a coded example correctly…
local targetName = "ChatWindow"
local name = "ToggleVisibility"
local signal = Instance.new("BindableEvent")
signal.Name = targetName.."_"..name
signal.Parent = script
game:GetService("StarterGui"):SetCore("CoreGuiChatConnections", {
[targetName] = {
[name] = signal,
};
})
while true do
wait(1)
signal:Fire(true)
wait(1)
signal:Fire(false)
end
I’m running this in a LocalScript and tried both ToggleVisibility and SetVisible although nothing appears to happen. Any thoughts on correcting this?
For any future future lurkers (those who use new TextChatService), just copy the documentation’s code found at StarterGui | Documentation - Roblox Creator Hub (search for CoreGuiChatConnections) but make sure to not copy the last part, as it doesn’t do much.
After that, you’d essentially be working with all the sets of events and functions you need! So have fun tinkering with corescripts.
EDIT:
Beware of some misleading documentation in specifically VisibilityStateChanged, it only changes the visibility state based on the value you fire to it when you use the method :Fire(). So instead of giving it true, give it the actual state of your chatGUI.