|
| 04 Nov 2012 03:01 PM |
so I made this script where my button is in the ScreenGui but not in the frame because the button would disappeer if it was in the frame. what I want to happen is when you click the close button, the fram is not visible. here is my script (it doesn't work and there isn't any output):
function onClicked() if game.StarterGui.ScreenGui.Frame.Visible==true then game.StarterGui.ScreenGui.Frame.Visible=false elseif game.StarterGui.ScreenGui.Frame.Visible==false then game.StarterGui.ScreenGui.Frame.Visible=true end end script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 04 Nov 2012 03:08 PM |
| Because You're doing it in the StarterGui, not the Player's Gui[ PlayerGui] |
|
|
| Report Abuse |
|
|
|
| 04 Nov 2012 03:10 PM |
| so what i do is put the screen gui in players? |
|
|
| Report Abuse |
|
|
|
| 04 Nov 2012 03:11 PM |
instead of "game.StarterGui"
put "script.Parent.Parent" and try it |
|
|
| Report Abuse |
|
|
|
| 04 Nov 2012 03:18 PM |
| but that would be identifying the ScreenGui and the ScreenGui dosen't have a visible property. here, in startergui i have a screengui in that i have a frame and close button. I need to get the frame able to go visible when it is invisible and invisible when it is visible just by clicking the button. |
|
|
| Report Abuse |
|
|