Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Opening And closing gui not working?

Asked by 7 years ago
Edited 7 years ago

i am making a new sim game gui only, and i'm trying to make windows open and close but it isn't working.


script.Parent.MouseButton1Click:connect(function(Click) script.Parent.Parent.Parent.Stuf.Click:Play() if script.v.Value = false then script.Parent.Parent.Parent.pop1.Visible = true script.v.Value = true else if script.v.Value = true then script.Parent.Parent.Parent.pop1.Visible = false script.v.Value = false end end end)

Getting this in output

11:53:08.180 - Players.Player1.PlayerGui.ScreenGui.Frame.Frame.ImageButton.ButtonDownGui:7: 'then' expected near '='

1 answer

Log in to vote
0
Answered by 7 years ago

Dont forget the local part and name it frame

script.parent.MouseButton1Click:connect(function()
frame.Visible = not frame.Visible**
end)

Fixed

Ad

Answer this question