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

What is wrong with my Script for this GUI?

script.Parent.MouseButton1Down:connect(function()
script.Parent.Visible = false


script.Parent.Parent.Parent.MenuGui.Menu.Visible = true 


end)

Okay i have a Click to start Gui, (or welcome GUI) The welcome GUI closes but im trying to make it so that when the the GUI closes another one opens up. What do i do to fix this because its not working.

1 answer

function onClicked()
script.Parent.Visible = false
script.Parent.Parent.Parent.MenuGui.Menu.Visible = true 


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Hope this helps !

2 comments

0

He's not using a ClickDetector, and using an anonymous function would work fine.

0

so dont use function onClicked/ forget about ClickDetector?

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