How to deactivate or modify layout order of chat window when in-game screen pops up?

Hello All,

In my game, when a player clicks to have the in-game store screen appear for purchases and upgrades, the chat box covers up a portion of the store screen. The store buttons underneath the chat aren’t accessible. How can I make those store buttons accessible? I don’t want to make the store screen smaller. I can think of two ways to address the issue:

  1. Deactivate the chat box when the store screen comes up, then reactivate the chat box when the player exits the store screen.
  2. Change some layout order so the store screen is on top of the chat box.

I am unsure how to go about either of these methods as I’ve never messed with the chat box. Can anyone explain how those options could be done, or even a better way to address the problem? Thank you!

You can use StarterGui:SetCoreGuiEnabled to hide and show the chat. The first argument is which CoreGui to hide, and the second argument sets it’s visibility.

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)