I’d like the chat to be closed when the user is in the shop interface. I don’t want to actually disable it, just hide/close it. The user can open it back up if they want to.
I’d like to avoid egg hunting again in the chat scripts so I’m hoping someone who’s had this problem before knows where to direct me.
Changing the Player.Chat.Frame.Visible has the same results as clicking the chat button to show and hide it.
Maybe you’d miss out on the little notification bubble but that’s about it.
Thanks for this, this is pretty good.
The problem with this is the chat is still marked as “open” and the user would need to click the button twice to open the chat. To avoid confusion I want to keep the chat behaviour the same.
Yeah no it’s definitely good. I still feel like though there will be some players who won’t be able to figure out why the chat isn’t opening. If considering you have a game with thousands of <10 age players
I may be very late to this thread but I found something following the conversation above which might help someone in future.
Essentially I’m using the chat script’s module to toggle the chat window visibility. This hides the chat window along with showing the button’s status as unpressed.
And put this script in StarterPlayerScripts.
local Players : Players = game:GetService("Players")
local localPlayer : Player? = Players.LocalPlayer
local playerScripts : PlayerScripts = localPlayer:WaitForChild("PlayerScripts")
local chatScript : ChatScript = playerScripts:WaitForChild("ChatScript")
local chatMain : ChatMain = require(chatScript:WaitForChild("ChatMain"))
local function closeChatWindow()
if chatMain.Visible then
chatMain.ToggleVisibility()
end
end
closeChatWindow()