So I have a GUI, that when opened I need the backpack to be shown. When the Shop Frame is visible, I need the backpack visible. But when the Shop frame is closed, I the need the backpack to hide.
This code will disable the Backpack once the player joins
local StarterGui = game:GetService('StarterGui') StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
This is what I tried to add
local player = game.Players.LocalPlayer if player.PlayerGui.Shop.Main.Visible == true then StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
This code, however, does not work.
How would I make it so once a frame is visible, it will set the Backpack to true?