I need help fixing a Shop Open Gui. For some reason, when I click it, it just doesn't open. Here's my Hierarchy, so you know what's going on: http://gyazo.com/94cd60bd298fe92c8add9c169725d408
And here's my code:
local ScreenGui = game.StarterGui.ScreenGui
local Button = script.Parent
local ShopBG = ScreenGui.ShopBG
function onClick()
if ShopBG.Visible == false then
ShopBG.Visible = true
elseif ShopBG.Visible == true then
ShopBG.Visible = false
else
print("An error has occured with the Shop Opening Script.")
end
end
Button.MouseButton1Click:connect(onClick)

2 comments
Thanks so much! If I could rate you up, I would. :)
Thanks bro glad i could help :D