RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
|
| 28 Feb 2016 01:45 AM |
MY GUI in my game wont close. Any gui. Shop,armor all cant close when you press X. game.ReplicatedStorage.GUI.CloseButton.CloseScript The script in the close X button is
function close() script.Parent.Parent.Parent:Remove() end
script.Parent.MouseButton1Click:connect(close) |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2016 02:37 AM |
Try to move the script into the textbutton then do
script.Parent.MouseButton1Down:connect(function(click) script.Parent:Destroy() end) |
|
|
| Report Abuse |
|
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
|
| 28 Feb 2016 02:52 AM |
^^ By the way. The game.ReplicatedStorage.GUI.CloseGUI is where the close gui is located so i dont know what do you mean by textbutton. Is it the Close Gui? |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2016 02:54 AM |
| Oh sorry the one you want them to click to delete it. Also all of this should be in starter gui. |
|
|
| Report Abuse |
|
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
|
| 28 Feb 2016 03:04 AM |
| No its supposed to be in replicated storage. The starter gui will show a button to open another gui |
|
|
| Report Abuse |
|
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
| |
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
| |
|
|
| 29 Feb 2016 12:10 AM |
You can still add this to StarterGui, you don't need a million guis, make the frame/button/whatever you're using Visible = false
db=1 script.Parent.MouseButton1Click:connect(function() if db==1 then db=2 frame.Visible = true else db=1 frame.Visible = false end)
|
|
|
| Report Abuse |
|
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
| |
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
|
| 29 Feb 2016 08:11 AM |
TRAMPOLINE! BACK TO THE FRONT FIRST PAGE! BUMPITY BUMP BUMP |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 29 Feb 2016 08:26 AM |
--place the gui in startergui
local gui = script.Parent local menu = gui.Parent.Parent
gui.MouseButton1Click:connect(function() menu:Destroy() end)
|
|
|
| Report Abuse |
|
|
RoblotXRB
|
  |
| Joined: 16 Nov 2014 |
| Total Posts: 2068 |
|
|
| 01 Mar 2016 11:57 PM |
^^^ IT seems to be working..
for now...... |
|
|
| Report Abuse |
|
|