When the default Roblox chat is disabled, the main chat UI is not visible, but the button in the top bar still appears:
The button should stay hidden when the chat is not enabled. This was the behavior up until this recently, sometime within the past few days.
This is the code I use to do this:
repeat until pcall(function()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end)
Example file:
SetCoreGuiEnabledExample.rbxl (54.8 KB)
For whatever reason, this does not happen every time. I can’t really discern what makes it happen only some of the time, but it seems to happen more reliably in game than in studio for me. If that example file doesn’t work in studio, try publishing it.
Example of where this is an issue: Ultimate Battlegrounds