Hello! I have a GUI menu that has a button that's supposed to closed the GUI when clicked. However, on click, nothing happens. Here's the code.
function close() script.Parent.Parent.Visible = false end script.Parent.MouseButton1Click:connect(close)
Thanks in advance!
Try this
function close() script.Parent.Parent.Position = UDim2.new(0, 0, -5, 0) end
Simply changing the position to be off the screen is usually the best solution
You can try making the gui first and put it on replicated storage, then clone it to playergui when opened and destroying it when closed