|
First off, I am aware that I am horrible at scripting, so I apologize if this is really simple and I am wasting your time by asking, but thanks for answering.
So I have a screenGUI, and I added a button, and when someone clicks that button I want another screen GUI to pop up that overlaps the first one. Can anyone help?
Thanks, |
|
|
WrathsongJoin Date: 2012-07-05 Post Count: 22393 |
^ |
|
|
Thanks, how do I make another GUI pop up? |
|
|
Correction: What function do I add that makes another GUI pop up? |
|
spinywindJoin Date: 2012-01-26 Post Count: 3580 |
u could use any function depending on how you want it to come up
|
|
|
Just toggle the visible property. |
|
|
Alright, can you help with this?
script.Parent.MouseButton1Click:connect(function()
game.Workspace. (What now? What do I add to make the screengui pop up? I have it in workspace, is that correct?)
end) |
|
|
Bump (help please, I have no idea what I am doing) |
|
|
Put the gui not in workspace put it in the screenGui with your button and just change its Visible property. |
|
|
|
Having more trouble, does anyone know what is wrong with this script?
a = Script.Parent.Parent.A
function run()
if a.Visible == false then
a.Visible = true
else
a.Visible = false
end
end
script.Parent.MouseButton1Click:connect (run)
I placed it into a textbutton that is under the same parent (the screengui) as the frame that I made invisible, but when I click the button the frame doesn't pop up. |
|
FrostOverJoin Date: 2013-06-20 Post Count: 299 |
get rid of and end |
|
|
a = Script.Parent.Parent.A
change that to
a = script.Parent.Parent.A
|
|
FrostOverJoin Date: 2013-06-20 Post Count: 299 |
nvm i got messed up
you should add the connection inside the function
you might need to change the Zindex |
|
|
'get rid of and end'
Don't |
|
|
'you should add the connection inside the function'
Don't do that either |
|
FrostOverJoin Date: 2013-06-20 Post Count: 299 |
I said nvm |
|
FrostOverJoin Date: 2013-06-20 Post Count: 299 |
it shortens the code with the connection in the function |
|
|
'it shortens the code with the connection in the function'
No, it breaks it.
Unless you mean with the function in the connection.
Also, shorter and better aren't the same. |
|
FrostOverJoin Date: 2013-06-20 Post Count: 299 |
I didn't say it was better I said it was shorter |
|
|
@128Gygabytes, Thanks! It's working properly now. |
|