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: Auto Close Gui

Previous Thread :: Next Thread 
DjBadyBoy is not online. DjBadyBoy
Joined: 01 Aug 2011
Total Posts: 681
06 Aug 2012 05:41 PM
how can i make a gui that wait about 15 seconds and then it gets removed by itself?
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
06 Aug 2012 05:42 PM
wait(15);
script.Parent:Destroy();

You might need to add in more parents though.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
06 Aug 2012 05:43 PM
wait(15)
script.Paremt:Destroy()
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
06 Aug 2012 05:45 PM
@ko That wouldn't work.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
06 Aug 2012 05:47 PM
Mobile phone keyboard.
:P
I just was trying to help.
Report Abuse
DjBadyBoy is not online. DjBadyBoy
Joined: 01 Aug 2011
Total Posts: 681
06 Aug 2012 05:51 PM
Thank you so much it worked!!! :DDDDDDDDDDD
Report Abuse
DjBadyBoy is not online. DjBadyBoy
Joined: 01 Aug 2011
Total Posts: 681
06 Aug 2012 05:53 PM
i said thx to Dr01d3k4 coz i tried it but i didn't try Ko
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
06 Aug 2012 06:06 PM
Heres a cooler one,

for i = 0,1,.1 do
wait(0.1)
wait(15)
script.Parent.Transparency = i
if script.Parent.Transparency == 1 then
script.Parent:Destroy()
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
06 Aug 2012 06:14 PM
@Epic: Doesn't work.
wait(15);
repeat
script.Parent.Transparency = script.Parent.Transparency - 0.1;
wait(0.1)
until (script.Parent.Transparency <= 0);
script.Parent:Destroy();
Report Abuse
OwNeD142 is not online. OwNeD142
Joined: 23 Dec 2009
Total Posts: 129
06 Aug 2012 06:30 PM
while true do
wait(15)
script.Parent:Remove()
script:Remove()
end

--OwNeD142
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
06 Aug 2012 06:33 PM
@Owned:
1) Use :Destroy()
2) That'd error after deleting the parent because the script will be nil, and even if that did work, it'd only error on the second iteration anyway.
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
06 Aug 2012 06:34 PM
My bad




for i = 0,1,.1 do
wait(0.1)
wait(15)
script.Parent.Transparency = i
end
if script.Parent.Transparency == 1 then
script.Parent:Destroy()
end


I forgot to put ends
Report Abuse
OwNeD142 is not online. OwNeD142
Joined: 23 Dec 2009
Total Posts: 129
06 Aug 2012 06:37 PM
Sorry I meant destroy and it works for me...
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
06 Aug 2012 06:42 PM
@Epic: Oops, I meant to put + in my script, we both got it wrong at first :P

@Owned: Hmm, yeah I suppose it would cause when it deletes the parent, the next line wouldn't run to cause an error, but it's still probably best if you have just script.Parent:Destroy();
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