#Why isnt the menu opening??

1 messages · Page 1 of 1 (latest)

rigid wraith
#

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)```
#

i've been like 30 minutes changing things and the menu just doesnt appear

deep steeple
#

Ask the ai in your studio assistant

vocal iron
#

not screengui

rigid wraith
vocal iron
#

i recommend you rename your frames name

#

can be confusing

#

later

#

but this should work

rigid wraith
#

i just tried and only the close button appears

rustic hollow
rigid wraith
ember tangle
#

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

summer prairie
empty patrol
rigid wraith
cyan basinBOT
#

studio** You are now Level 1! **studio

rigid wraith
#

anyway. i found how to fix it