So i’m trying to create a lua version of the old topbar and leaderboard and that includes
recreating the buttons functionality, that includes creating a Enable-Disable button for the chat.
Searching for a solution i didn’t find anything related to my question i tried to search the developer hub for a possible solution but all that apeared was just a blank page.
The Closest Than I Can Find Is ChatOnWithTopBarOff
But Thats for enabling the chat Window While Topbar is off.
I Don’t disable the topbar i disable the core scripts chat icon.
ok so, for people than try to figgure out how to do this i found out than in the ChatMain module theres a function called ToggleVisibility(). all than you have to do is require that module though your script and you are done heres an example
-- Get The Module
local ChatMain = require(game.Players.LocalPlayer.PlayerScripts.ChatScript:WaitForChild("ChatMain"))
ChatMain:ToggleVisibility() -- This Function Toggles the chat window like the core gui button does