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: Debris?

Previous Thread :: Next Thread 
RealPerseus is not online. RealPerseus
Joined: 02 Jan 2012
Total Posts: 29
16 Feb 2014 04:13 PM
i was wondering how to use the debris?

and how it realy works
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
16 Feb 2014 04:20 PM
It's just delayed garbage collection.

local debris = Game:GetService("Debris")
debris.AddItem(Workspace.adark, 20)

is equivalent to:

wait(20)
Workspace.adark:Destroy()

However, when using Debris, you don't get an error if the object doesn't exist when you try to destroy it.

Debris is also useful when you want to remove a script after it runs, since that will sometimes produce an error, but using Debris will simply wait until it can be destroyed.
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