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 » Scripting Helpers
Home Search
 

Re: Gui scripting

Previous Thread :: Next Thread 
xJaySoFresh is not online. xJaySoFresh
Joined: 25 Aug 2011
Total Posts: 28
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
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
20 Mar 2014 09:19 PM
yep--you make it.
Report Abuse
bcramaster is not online. bcramaster
Joined: 16 Oct 2011
Total Posts: 123
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 is not online. 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
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
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
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
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 is not online. ZombieT2
Joined: 06 May 2012
Total Posts: 6000
21 Mar 2014 11:45 AM
gg.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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