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: How to make it on second click? (GUI)

Previous Thread :: Next Thread 
JamesBond1010 is not online. JamesBond1010
Joined: 06 Sep 2008
Total Posts: 1895
12 Nov 2011 12:21 PM
This is the script(it's meant for a GUI):

function onClicked(GUI)
h = script.Parent.Parent.Parent.Parent.Parent.Character:findFirstChild("Humanoid")
if (h ~= nil) then
script.Parent.Parent.Parent.Frame.Visible = true
else return end
end
script.Parent.MouseButton1Click:connect(onClicked)

This currently will open my instruction GUI onClick, but how to make it close if you click the GUI again?

I tried 2 lines together, one with 'true' other with 'false' statement.

HELP
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
12 Nov 2011 12:22 PM
You a gui to be clicked two times to make a print?
Report Abuse
JamesBond1010 is not online. JamesBond1010
Joined: 06 Sep 2008
Total Posts: 1895
12 Nov 2011 12:23 PM
<.<
Report Abuse
sharky99 is not online. sharky99
Joined: 18 Dec 2008
Total Posts: 3364
12 Nov 2011 12:24 PM
Have a counter.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
12 Nov 2011 12:27 PM
USE ELSE!!!!!!!!!!!
Report Abuse
Apocalyps is not online. Apocalyps
Joined: 15 Feb 2009
Total Posts: 816
12 Nov 2011 12:34 PM
function onClicked(GUI)
h = script.Parent.Parent.Parent.Parent.Parent.Character:findFirstChild("Humanoid")
if (h ~= nil) then
script.Parent.Parent.Parent.Frame.Visible = not script.Parent.Parent.Parent.Frame.Visible
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
12 Nov 2011 12:36 PM
OMG Apocalyps is back from the scripting helpers :D
Report Abuse
JamesBond1010 is not online. JamesBond1010
Joined: 06 Sep 2008
Total Posts: 1895
12 Nov 2011 12:38 PM
Thank you so much Apocalyps!
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