Hey! So, im currently working with Topbarplus, and im trying to get it to when i click on the top bar UI, it opens a UI. But, it isn’t working. This is my current Code:
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Icon = require(ReplicatedStorage.Icon)
local StarterGui = game:GetService('StarterGui')
local GreetingsUI = require(StarterGui.MainUI.ContainerUI)
Icon.new()
:setImage(17185842953)
:bindEvent("deselected", function()
GreetingsUI.Visible = not GreetingsUI.Visible
end)
print('Sucsess, carried out action.')
:oneClick()
No matter how may different ways I try to reference it, it wont work. Initially, i did it like this:
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Icon = require(ReplicatedStorage.Icon)
local GreetingsUI = game.StarterGui.MainUI.ContainerUI
Icon.new()
:setImage(17185842953)
:bindEvent("deselected", function()
GreetingsUI.Visible = not GreetingsUI.Visible
end)
print('Sucsess, carried out action.')
:oneClick()