Help with Scripting GUI

I made a Side Screen GUI which gives you the following SHOP, JOBS and CREDITS. I scripted a script for the options so they can be opened and closed. I manage to make the close script work but I couldn’t get the gui frame to open. If someone can tell me what’s wrong with the script that would be great!

Here is the script I made:

script.Parent.Parent.Parent.Credits.Visible = true


I’m assuming that “Credit” which the “LocalScript” is parented to is the button you’d like to be used.

local Button = script.Parentlocal Credits = script.Parent.Parent.Parent.Credits

	Credits.Visible = not Credits.Visible

Thanks, for helping me but it didn’t work for some reason. Here is the Gui that is used for the side gui. The credits frame is the CREDIT GUI.

So, are you trying to make a “Credits” menu become visible and invisible?
If so, where is this?
I’m sure you’re not trying to hide the button since that would eliminate the way you’d make it reappear.

Unless you mean that the Children of Credit is the “Credits” menu, what I suggest doing then is putting them all in a separate Frame instance and changing “local Credits” in my before mentioned code to whatever you changed the Frame instance to.

Yes, I am trying to make it when you click Credits option the Credits frame shows up. GuiOpen

watch this video and hopefully it will help you.

Try this, this may work:
script.Parent.Parent.Credits.Visible = true