Why this wont work?(i tried both local script and script)
function OnClicked() on = 1 if on == 1 then on = 0 script.Parent.Parent.Frame.Visible = false end if on == 0 then on = 1 script.Parent.Parent.Frame.Visible = true end end script.Parent.MouseButton1Click:connect(OnClicked)
Edited Ok I have it now, this should work. I just tested this in studio.
on = 1 script.Parent.MouseButton1Down:connect(function() if on == 1 then on = 0 script.Parent.Parent.Frame.Visible = false elseif on == 0 then on = 1 script.Parent.Parent.Frame.Visible = true end end)