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

How do i make it so a gui opens when someone clicks a gui? [closed]

Asked by 4 years ago

So i i'm making a mini game so i want it that when you click the PLAY Gui the message on the top which is a GUI opens.

Closed as Not Constructive by youtubemasterWOW

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?

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Alright so you first have to define the gui.You didnt give to much information about it but here's how to do it.

local gui = script.Parent.Parent.Parent("Your name")  --type parent til you reach the playergui then the name of the gui.

function onClicked()
    gui.Enabled = true
    script.Parent.Visible = false --is this what you want?
end

script.Parent.MouseButton1Click:Connect(onClicked) -- also put the script inside the button.

I typed it with parent because it's gonna be parented to "PlayerGui" when you start the game. Say if you

Ad