Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to reopen guis when they close?

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

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.

3 comments

0

please use a variable..

0

If it's for a GUI you can't use "Visible". It's visible property is called "Enabled". script.Parent.Parent.Enabled = false.

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.