Wrote a script which tells you when open gui "buy coins here" it should open that gui which it doesn't anyone know?

That is for the button when clicked should open shop
The x button to exit

1 Like

Can you show me the children of the ScreenGUI?

The code for the x button should be

script.Parent.Parent.Frame.Visible = false

In the second screenshot, script.parent.parent.MouseButtonClick:Connect(function() should be:

When you use .Parent the “P” must always be capital.

Ok thanks for that but when testing i cannot open the GUI shop when pressing the button

What are you using as the shop button? Is it a TextButton?
Could you also screenshot your Output if theres any errors.

this is the output and yes im using a text button

Can you send a screenshot of your Explorer showing where everything is located inside the ScreenGui?



do this it will work i promise

I don’t think he means the actual “X” key on a keyboard but is meaning a TextButton as a X button. Unless he does.

Yes im using an x as a text button and i want when use press the x button it disappears

ANY ideas??? i really dont know

You had a few errors on the way you typed it. Try EXACTLY this:

	script.Parent.Parent.Frame.Visible = true
	script.Parent.Parent.Visible = false

If you look closely, you can see the typing errors you did. I hope this helped you :happy3:

Im a bit of a starter Lol which one do i put in the x button and which but the button to open the gui

This is for the Frame that you want to open when script.Parent is pressed:

This is for the X Button that you want to close the Frame when it’s pressed:

Thanks a will try right now!!!

same scripts, the only difference is that if its visible or not

to be honest i dont know what he means, he needs to explain better i guess

If it doesnt work, maybe try changing the script on the X button to this:

	script.Parent.Parent.Frame.Visible = false

Also, make sure its a local script :happy3: