generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

GUI Close button not working

Previous Thread :: Next Thread 
RoblotXRB is not online. 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
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
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 is not online. 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
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
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 is not online. 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 is not online. RoblotXRB
Joined: 16 Nov 2014
Total Posts: 2068
28 Feb 2016 05:22 AM
bump
Report Abuse
RoblotXRB is not online. RoblotXRB
Joined: 16 Nov 2014
Total Posts: 2068
29 Feb 2016 12:04 AM
BUMP GOD DAMNIT
Report Abuse
DevelopmentStatus is not online. DevelopmentStatus
Joined: 22 Apr 2015
Total Posts: 235
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 is not online. RoblotXRB
Joined: 16 Nov 2014
Total Posts: 2068
29 Feb 2016 04:06 AM
whats db?
Report Abuse
RoblotXRB is not online. 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 is not online. 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 is not online. RoblotXRB
Joined: 16 Nov 2014
Total Posts: 2068
01 Mar 2016 11:57 PM
^^^ IT seems to be working..







for now......
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image