local screenGui = script.Parent
local openButton = screenGui:WaitForChild("Upgrades")
local panel = screenGui:WaitForChild("Frame")
local closeButton = screenGui:WaitForChild("CloseButton")
panel.Visible = false
closeButton.Visible = false
openButton.MouseButton1Click:Connect(function()
panel.Visible = true
closeButton.Visible = true
end)
closeButton.MouseButton1Click:Connect(function()
panel.Visible = false
closeButton.Visible = false
end)```
#Why isnt the menu opening??
1 messages · Page 1 of 1 (latest)
Ask the ai in your studio assistant
frame is upgrades children
not screengui
so, with that script, this structure works?? @vocal iron
maybe
i recommend you rename your frames name
can be confusing
later
but this should work
i just tried and only the close button appears
check output window for errors related to your gui, then fix them as they arise. if you're not sure what an error means, google it first and make an attempt to fix it before asking 👍
i already tried to fix it myself, and i even used the roblox ai, im asking for help bc after that i still dont understand what is wrong, i replaced names, replaced script lines, etc
so like
@rigid wraith
closebuttom is not a direct child of screenGui
your hierarchy is okay but
your code is saying local closeButton = screenGui:WaitForChild("CloseButton")
it’ll never find it because close button is inside frame not screenGui
maybe
try
to this sorry wrong thing
local closeButton = panel:WaitForChild("CloseButton")
just change local closeButtom = screenGui:WaitforChild(“CloseButton”) which is the one you have right now to the new one i put
@rigid wraith
This structure is so super cooked
why
fr
** You are now Level 1! **
anyway. i found how to fix it