You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I’m trying to make a button that hides/shows a gui
What is the issue? Include screenshots / videos if possible!
It isn’t working. No errors.
What solutions have you tried so far?
I looked almost everywhere
local frame = game.StarterGui.ScreenGui1.ScrollingFrame -- Target (Don't edt this)
script.Parent.MouseButton1Click:connect(function() -- Functions Below if Player's mouse hits a button
if frame.Visible == false then -- I honestly don't know
frame.Visible = true -- Once player's mouse hits the button the frame will open
frame.Visible = false -- If hit again then it closes
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
You get it from the script, it’s not really something you can get otherwise. An example would be if you put a frame in StarterGui, then put a LocalScript under it. You don’t reference it with game.StarterGui, you do so like this:
local frm = script.Parent -- the right way
local frm = game.StarterGui.Frame -- don't do this
Please try to change your script to do something similar, it won’t work if you use StarterGui.
No, it would be script, followed by the path. Remember that you can go up a level with parent, so you can use this to reference your GUI starting from the script instead of game. For example, if you have a GUI element with a script inside it, you’d reference the GUI with script.Parent, referencing it from game and going down will not work.