GUI Shop Open And Close Script Not Working? (SOLVED)
Asked by
6 years ago Edited 6 years ago
So I am making a GUI shop for my game but when I am trying to make an open/close script, it never seems to work. Am I missing something or doing something wrong? Here is what my localscript contains:
01 | local button = game.StarterGui.Shop.openclose.openclose |
03 | local ShopFrame = button.Parent.Parent.main |
05 | button.MouseButton 1 Click:Connect( function () |
06 | if Opened = = false then |
07 | ShopFrame.Visible = true |
10 | ShopFrame.Visible = false |
Answer: Basically I changed the script so it would work. This is what I got:
01 | local frame = script.Parent.Parent.main |
04 | script.Parent.openclose.MouseButton 1 Click:connect( function () |
05 | if frame.Visible = = false then |