Trying to make a close UI but a glitch broke it

Before you critizize me read everything first =/

1 Like

Select all of the text buttons and labels and move them into the frame

Unless you changed it afterwards, which I see now that you did, my apologies, for breakpoints (debugging), you can click beside the numbers in the script and a red dot will appear, that will stop the code at that line. Also make use of print lines.

I see in your screenshot that it isn’t

The script in the post only changes MenuFrame’s visible property. And the script in reply is totally wrong and makes no sense, This is what it should look like.

script.Parent.MouseButton1Click:Connect(function()
     script.Parent.Parent.MenuFrame.Visible = false
     script.Parent.Parent.AvatarButton.Visible = false
     script.Parent.Visible = false
     script.Parent.Parent.ShopButton.Visible = false
     script.Parent.Parent.MenuText.Visible = false
end)

You could also use the script below to destroy the menu, make sure it’s ResetOnSpawn is false,

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent:Remove()
end)
1 Like

I was talking about the script included in this reply, which is his script.

1 Like

Oh, I’m sorry that’s my bad, I actually thought you were talking about the other replies.

I would recommend putting all the UI stuff into one script.

put the gui in one script bundle