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: Problem with (Exit gui script),help please...

Previous Thread :: Next Thread 
GOGIDY is not online. GOGIDY
Joined: 17 Nov 2013
Total Posts: 13
18 Nov 2013 06:59 PM
1.function onClick()
2.script.Parent.Parent:Remove() --this is assuming the gui is GUI>Frame>Exit
3.wait(0.5)
4.end --not sure if wait and end are necessary considering it just removed itself
5.
6.script.Parent.MouseButton1Click:connect(onClick) --not sure if script.Parent is what goes there
7.
8.--now if you just want the gui to disappear:
9.
10.function onClick()
11.script.Parent.Parent.Visible = false
12.wait(0.5)
13.script.Parent.MouseButton1Click:connect onClick() --same as first section's note


There is a problem on line 13!!!
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
18 Nov 2013 07:00 PM
Corrected line 13 for you:

script.Parent.MouseButton1Click:connect(onClick)

onClick remains in the connect function.
Report Abuse
GOGIDY is not online. GOGIDY
Joined: 17 Nov 2013
Total Posts: 13
18 Nov 2013 07:03 PM
Thank you
Report Abuse
GOGIDY is not online. GOGIDY
Joined: 17 Nov 2013
Total Posts: 13
18 Nov 2013 07:04 PM
No it's still is an error...
Report Abuse
GOGIDY is not online. GOGIDY
Joined: 17 Nov 2013
Total Posts: 13
18 Nov 2013 07:07 PM
Ok i figured out the problem,thanks anyways,yours was just partial correct...
Report Abuse
GOGIDY is not online. GOGIDY
Joined: 17 Nov 2013
Total Posts: 13
18 Nov 2013 07:09 PM
1.function onClick()
2.script.Parent.Parent:Remove() --this is assuming the gui is GUI>Frame>Exit
3.wait(0.5)
4.end --not sure if wait and end are necessary considering it just removed itself
5.
6.script.Parent.MouseButton1Click:connect(onClick) --not sure if script.Parent is what goes there
7.
8.--now if you just want the gui to disappear:
9.
10.function onClick()
12. end --I forgot to put end on line 12,well anyways i fixed with a little help
11.script.Parent.Parent.Visible = false
12.wait(0.5)
13.script.Parent.MouseButton1Click:connect onClick() --same as first section's note
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