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

How do I disable a screengui when I press a gui? e.g - play [closed]

Asked by 10 years ago

I've got a Start menu for my game and I want it to disappear when I press play, how would I do this?

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 10 years ago
GUI = 

script.Parent.GUI.MouseButton1Down:connect(function()
script.Parent:remove()
end)

or

GUI = 

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

Precise variable, also precise parents if they doesnt fit.

0
Hi, Where would I insert the script? The TextButton? Intoxicatedbrownie 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

you could either do this GUI:remove()

or just make everything inside the GUI invisible

GUIchildName.Visible = false