|
| 20 Mar 2014 09:19 PM |
| A script that goes into a text button then when you click it, the gui gets closed. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Mar 2014 09:53 PM |
| You're not really helping yourself by telling us to make a script. I do not believe many would just make you a script, without pay anyway. Please post another thread with what you have so far, and you will receive help a lot easier. |
|
|
| Report Abuse |
|
|
ZombieT2
|
  |
| Joined: 06 May 2012 |
| Total Posts: 6000 |
|
|
| 20 Mar 2014 11:13 PM |
Try this:
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.GuiName.Visible = false wait() end) |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 01:43 AM |
^ Your method would work, but I find it more efficient to just remove/destroy it, since the StarterGui is refreshed when the player respawns.
Put this into the script. (Make sure it's not local.)
function clicked(GUI) script.Parent.:Destroy() end
script.Parent.MousButton1Click:connect(clicked)
If there's more gui than just the TextButton, then do script.Parent.Parent and so on until you hit the whole Gui, then put the :Destroy().
Hope I helped! |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 01:45 AM |
Typo.
function clicked(GUI) script.Parent:Destroy() end
script.Parent.MouseButton1Click:connect(clicked)
Follow the above post as usual, just use this code instead. |
|
|
| Report Abuse |
|
|
ZombieT2
|
  |
| Joined: 06 May 2012 |
| Total Posts: 6000 |
|
| |
|