if script.Parent.Parent.Visible == false then script.Parent.MouseButton1Click:Connect(function(player) script.Parent.Parent.Visible = true
end
Please fix this script i'm trying to make a menu button for a GUI.
Players.JAX_AtRB.PlayerGui.ForNIBS2.Frame.Menu.LocalScript:6: Expected ')' (to close '(' at line 3), got <eof>
script.Parent.MouseButton1Click:Connect(function(player) script.Parent.Parent.Visible == true
You probably don't need the if visible == false because it's a MouseButton1Click function, and you are setting what happens when you click whatever you are trying to target. To make things less complicated, you could insert another TextButton up on top of the GUI, and put a script into it as when you click it, it turns your GUI invisible.
If you need any further help, feel free to comment and I'll see what I can do.
if script.Parent.Parent.Visible == false then script.Parent.MouseButton1Click:Connect(function(player) script.Parent.Parent.Visible = true end) end
You could also do it like this if you want the visibility to be the opposite to what it currently is when you click the button
script.Parent.MouseButton1Click:Connect(function(player) script.Parent.Parent.Visible = not script.Parent.Parent.Visible end)