9288605
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 12442 |
|
|
| 06 Jan 2014 08:38 PM |
So I'm making a GUI that has 2 texbox's (TextBox and TextBox3), a textbutton, all within a frame, under a ScreenGUI in StarterGUI tab-- if that is important. Under the Textbutton I inserted a script which is supposed to remove/close the whole GUI when you click the textbutton. I have this script in it but all it does when I click the box is absolutely nothing. Here is the script (please help):
function onClick() element.MouseButton1Click:connect(onClick) ScreenGui.Visible = false
|
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Jan 2014 08:40 PM |
You didn't define the ScreenGui
Or end the function and connect it |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 06 Jan 2014 08:40 PM |
1) You're missing an end. 2) There's an output. 3) ScreenGui isn't defined, yet you're using it like a variable. 4) ScreenGuis don't have a Visible property. If you want to toggle the visibility off on all things within the ScreenGui, you'll either have to loop through them, or put everything in a frame, and changed the visible property of the frame. |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 08:52 PM |
oh wow,is that the full script u have? no wonder its not working.. |
|
|
| Report Abuse |
|
|
9288605
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 12442 |
|
|
| 06 Jan 2014 09:00 PM |
| Can someone please give me a simple script that just closes a GUI? |
|
|
| Report Abuse |
|
|
9288605
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 12442 |
|
|
| 06 Jan 2014 09:08 PM |
| I made it so if you click the textbox's it closes, but the frame will not go away. |
|
|
| Report Abuse |
|
|
9288605
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 12442 |
|
|
| 06 Jan 2014 09:10 PM |
| Oh, I was using the style "RobloxRound" which stays the same. |
|
|
| Report Abuse |
|
|
9288605
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 12442 |
|
| |
|