Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help! Why doesn't my LocalScript for my GUI button to open another gui work?

My script is this, for opening the gui:

function a()
script.Menu.Visible = true
end
script.Parent.MouseButton1Down:Connect(a)

And this frame should open: (Inside the script)

The tree is like this:

TextButton > LocalScript > Menu > (this one is the frame)

I try to make script.Menu visible as you see but it doesn't work.

Can someone help me? This is the only script in my whole game that doesn't work. Thank you from your answers!

4 comments

0

Also everything is inside something. LocalScript is inside TextButton and menu inside the LocalScript.

0

I don't see the tree or something. You're missing something on your preview?

0

Script.Menu is probably the GUI itself. If you want to make the GUI visible then you need to make the frame inside the GUI visible instead (script.Menu.Frame) -- except put the frame name

0

He already said the Menu is the frame ^^

1 answer

do this instead:

script.Parent.MouseButton1Down:Connect(function()
script.Menu.Visible = true
end)

that will connect the function make sure the menu is inside a gui or it wont show

This discussion is preserved as it was. New answers, comments, and votes are closed.