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

Why when I open a gui it wont reopen?

Asked by
Xocnx 0
3 years ago

When I open a gui it will open but when i try to reopen it after closing it the 2nd time it wont reopen

Here is the script I used for the open button .

script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.PlayerGui.Gui.Submenus.Stats.Visible = true end)

Here is the script I used for the close button.

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

Does anyone think they can help me?

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

This a really simple Fix.

Instead Of Putting'MouseButton1Click' In Script 2 Put 'MouseButton1Down Or MouseButton1Up'

Because Since Your Wanting To Close The Frame In script 2 The Script Doesn't Know That Because You Have Already Assigned MouseButton1Click To The Open Button So You Would Have To put Something Else

And That Is MouseButton1Down Or MouseButton1Up

Ad

Answer this question