lukaguy98
|
  |
| Joined: 24 Jul 2011 |
| Total Posts: 670 |
|
|
| 19 Mar 2014 12:53 PM |
gui.MouseButton1Click:connect(function() game.StarterGui.Simulator.Frame:Destroy() end)
Basically if you press a textbutton, the frame is removed from the screen. Should I try remove() or what am i doing wrong? |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:54 PM |
| do remove(), since you would not get the GUI back. |
|
|
| Report Abuse |
|
|
lukaguy98
|
  |
| Joined: 24 Jul 2011 |
| Total Posts: 670 |
|
| |
|
lukaguy98
|
  |
| Joined: 24 Jul 2011 |
| Total Posts: 670 |
|
| |
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 19 Mar 2014 12:58 PM |
If there is a player in the game, then you need to remove it from the player; those stuff in the StarterGui are just copied to the player.
So something like: game.Players.Player.PlayerGui.Simulator.Frame:Destroy() would work |
|
|
| Report Abuse |
|
|
lukaguy98
|
  |
| Joined: 24 Jul 2011 |
| Total Posts: 670 |
|
|
| 19 Mar 2014 01:00 PM |
| Would that need a localscript? |
|
|
| Report Abuse |
|
|
lukaguy98
|
  |
| Joined: 24 Jul 2011 |
| Total Posts: 670 |
|
| |
|
LemmJuice
|
  |
| Joined: 23 Feb 2014 |
| Total Posts: 866 |
|
|
| 19 Mar 2014 01:01 PM |
Yes, A Gui will most likely need a local script. Just place it in the same place as the frame and then use the .parent to go to other guis. |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 19 Mar 2014 01:02 PM |
If it was a localscript you could easily acces the local player object by doing game.Players.LocalPlayer If you have it in a normal script then you will have to replace the ".Player." part with the player you want it removed by. |
|
|
| Report Abuse |
|
|