Programming GUI issue

Screen Shot 2020-11-10 at 1.37.06 PM

Where the blue highlight is, that is the script not working.

You can’t click on the gamepassesgui because it’s not a button.

That is the actual GUI… it isn’t meant to be a button. It is going to display all of the game passes that will be sold.

Have you figured out the open and close.

Only clickable images, buttons, etc. will have a button touch function to it.

I figured out the close, but it won’t open up.

What do you mean? If that is the case, how did the menu operate in the first place?

If that’s so, then you need to tell you function what button needs to be clicked in order for it to run. Script.Parent is saying the GamepassesGui will run once clicked, but you can’t click the GamepassesGui.

Make a boolean value for the open and close and make an if statement.

Well it is supposed to show up when the gamepass button is clicked.

Because if the parent of the script is a clickable image or button then the function can run. The rest of your scripts refer to script.Parent, and they all have buttons, so it’ll run.

For reference, you click the “gamepasses” button and that GUI is meant to open

if you want it show up when that gamepass button is clicked then you would need to go back to the GamepassesButton script. And from there you would set the gamepassesGui.Visible to true
inside the function.

Great! I’ll try that now. I put it inside the function there, correct?

Yup, make sure your variables are properly referenced. Although the local script in GamepassesGui has no function, I would delete that script to keep your game neat.

Actually, it removes the shop GUI when the game pass button is clicked. - as you know

Ohhh okay, sorry. Keep it if needed.

also if I may ask, what exactly would the function & variable?

Send a picture of what you have in the local script of “GamePassesButton”

Screen Shot 2020-11-10 at 1.58.41 PM