I am making a GUI which has a Show/Hide button. For some reason, this does not work. The other problem is when I try to run it in Roblox studio and change the visibility there, it does not turn off. There are no syntax errors detected by Roblox studio. This is also being used in a Seat so when you sit on it it gives you the GUI (will be placed in seat.
Here is the code:
Guithing = script.parent.parent.Frame --Only frame object there
function onClick()
if Guithing.Visible == true then
Guithing.Visible = false
elseif Guithing.Visible == false then
Guithing.Visible = true
end
end
script.parent.MouseButton1Click:connect(onClick)
Here is the folder structure:
Seat
-StarterGui
--ScreenGui
---ControlGui
----Frame (To Hide)
-----...22 text labels...
----TextButton (Button To Hide)

1 comment
Parents are capitalized...