So I scripted this local script in my shop GUI to pop up when you click it. (there are three parts to the shop GUI; Swords, Effects, and Coins). So that way when you click one of the (Swords, Effects, and coins) GUIs the list of items would pop up. I thought I got everything right but I was wrong.
Swords = script.Parent.Parent.Swords
Sword = script.Parent.Parent.Sword
Effects = script.Parent.Parent.Effects
Effect = script.Parent.Parent.Effect
Coins = script.Parent.Parent.Coins
Coin = script.Parent.Parent.Coin
visible = false
Swords.MouseButton1Down:Connect(function()
if visible == false then
Sword.Visible = true
visible = true
end
Effect.Visible = false -- these two lines of code tell the other guis to close when this gui is opened
Coin.Visible = false
end)
When I press the button the gui will pop up and the others disappeared but after clicking it multiple times it wouldn't work. (BTW I am new to scripting so thanks.) I put this local script in every button but I just changed the Coins and Swords and effects. Thank you! If you need more details I'll give more details.
When I press the button the gui will pop up and the others disappeared but after clicking it multiple times it wouldn't work.
Link to a video with more details: (http://drive.google.com/file/d/1PnznmaG1j_8U8jIJpnJ_WcaZrOME-Oay/view?usp=sharing[])

6 comments
could you send a screenshot of your GUI in Explorer? The problem is probably in your variable declarations.
Also, it's good practice to use LinkedSources so that you can change one script to affect all the others, since right now you would have to copy/paste the script over and over if you want to make a change. (quote: "I put this local script in every button")
Ok
How do I embed an image? Do I just use a link?
just paste the link here
http://drive.google.com/file/d/1PnznmaG1j_8U8jIJpnJ_WcaZrOME-Oay/view?usp=sharing[]