Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is wrong with my Script for this GUI?

Asked by 10 years ago
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

Log in to vote
-1
Answered by
Seraine 103
10 years ago
function onClicked()
script.Parent.Visible = false
script.Parent.Parent.Parent.MenuGui.Menu.Visible = true 


end

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

Hope this helps !

0
He's not using a ClickDetector, and using an anonymous function would work fine. Ekkoh 635 — 10y
0
so dont use function onClicked/ forget about ClickDetector? Piplup572 10 — 10y
Ad

Answer this question