✓ Accepted answer
The active user-interface doesn't reside under StarterGui. This Service acts as a container for the general UI assets that are to be replicated to each individual Client (Player). For an easier explanation, It is akin to the way StarterGear behaves.
In order to individually modify local GUIs, you must reference the PlayerGui container, within the LocalPlayer.
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGUI = Player:WaitForChild("PlayerGui")
local GamepassesGUI = PlayerGUI:WaitForChild("Gamepasses")
local ShopFrame = GamepassesGUI:WaitForChild("Shop")
local ButtonContainer = GamepassesGUI:WaitForChild("FrameA")
local OpenButton = ButtonContainer:WaitForChild("ImageButton")
local function OnButtonClicked()
ShopFrame.Visible = (not ShopFrame.Visible)
end
OpenButton.MouseButton1Click:Connect(OnButtonClicked)
2 comments
Oh and on the end it should be (Visible)
There are YT tutorials all about GUIs they are helpful