Help with TopBar V3

Hi so I have this topbar v3 script

local container  = script.Parent
local Icon = require(container.Icon)
local shop = game.StarterGui.Shop.Frame
local gui = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("Shop")

Icon.new()
	:setImage(16346990319)
	:setLabel("Shop")
    :bindToggleItem(gui)

and it doesn’t seem to open the gui any suggestions??

1 Like

Is shop a screensgui?

Usuly this method would be used for guiobjects like Frame or ImageLabel, which would be INSIDE a screengui

1 Like

I don’t know if this works or not?

local container  = script.Parent
local Icon = require(container.Icon)
local shop = game.Players.LocalPlayer.PlayerGui:WaitForChild("Shop")
local gui = shop:WaitForChild("Frame")

Icon.new()
	:setImage(16346990319)
	:setLabel("Shop")
    :bindToggleItem(gui)
2 Likes

you have to pass a frame, not gui

1 Like