Hey! I want to hide the chat button in my game without actually disabling it. How can I do it? I need the chat to be still enabled but the Icon should not be visible.
You’d have to make a custom chat UI, other wise I think you can’t
Yes this is possible!
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType,false)
With SetCoreGuiEnabled you turn off the whole chat. I want to only disable the icon.
Oh i am sorry, I read it wrong.
But to answer your question! I think the best way to do this is making your own custom chat.
You can fork the chat (In-Experience Text Chat | Roblox Creator Documentation) and enable this under the ChatSettings module that is under ClientChatModules
I figured out a way for you to only disable the chat icon.
First, fork the chat scripts. This can be done by doing a play test and copying everything from the Chat service in the explorer and then quitting the session and pasting them into the Chat service again.
Then in ChatScript, there should be something called ChatMain, click on it and go to line 549, there you should see this
moduleApiTable.CoreGuiEnabled:connect(function(enabled)
moduleApiTable.IsCoreGuiEnabled = enabled
enabled = enabled and (moduleApiTable.TopbarEnabled or ChatSettings.ChatOnWithTopBarOff)
ChatWindow:SetCoreGuiEnabled(enabled)
if (not enabled) then
ChatBar:ReleaseFocus()
InstantFadeOut()
else
InstantFadeIn()
end
end)
The lines
moduleApiTable.IsCoreGuiEnabled = enabled
enabled = enabled and (moduleApiTable.TopbarEnabled or ChatSettings.ChatOnWithTopBarOff)
Are the ones that we have to care about, since you want o nly the icon to be disabled, set the values to true
moduleApiTable.IsCoreGuiEnabled = true
enabled = true
And then in a localscript, use SetCoreGuiEnabled and disable the chat
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
Since we forcefully made it so enabled is always true, the chat will stay open but the button disappears