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

How to reopen guis when they close?

Asked by 5 years ago

Hello, So I have a question! My gui is not opening after I close it for some reason! can someone help me out?

script.Parent.MouseButton1Click:Connect(function()

script.Parent.Parent.Visible = false

end)

I have always used that code but it never reopens I just noticed it.

1 answer

Log in to vote
0
Answered by 5 years ago

I'd suggest adding a Frame to your Gui. This is a more effective way of opening and closing a Gui. In the TextButton, add this code:

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Frame.Visible = not script.Parent.Parent.Frame.Visible
end)

The script your wrote down, makes the GUI completely false.

0
please use a variable.. Elixcore 1337 — 5y
0
If it's for a GUI you can't use "Visible". It's visible property is called "Enabled". script.Parent.Parent.Enabled = false. Babyseal1015 56 — 5y
0
Fixed it local frame = script.Parent.Parent.Frame local open = false script.Parent.MouseButton1Click:Connect(function() if frame.Visible == false then frame.Visible = true end end) Darthman522 10 — 5y
Ad

Answer this question