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: :remove() VS :Destroy()

Previous Thread :: Next Thread 
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
10 Mar 2014 09:01 PM
Whats the difference?
Why is Destroy > Remove?

Downgrading CWHP/BB/STF
Report Abuse
Savash21 is not online. Savash21
Joined: 28 Dec 2008
Total Posts: 114
10 Mar 2014 09:05 PM
Because remove does not completely get rid of it.
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
10 Mar 2014 09:06 PM
^Elaborate

Downgrading CWHP/BB/STF
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
10 Mar 2014 09:08 PM
remove() SETS the parent to nil,while destroy() LOCKS the parent to nil

if u had a script in workspace that said:
Workspace.Baseplate:remove()
and u press play,the base will delete,but going back with the << button will bring it back
BUT if u said
Workspace.Baseplate:destroy() and then went back with the << button
output:

error:Baseplates parent is locked(or something similar)

long story short,remove() is depreceated
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
10 Mar 2014 09:09 PM
Well it seems that remove would be more useful.
If I wanted to bring it back.

Downgrading CWHP/BB/STF
Report Abuse
Savash21 is not online. Savash21
Joined: 28 Dec 2008
Total Posts: 114
10 Mar 2014 09:11 PM
The Destroy() method works once you call this method on an object, you will never be able to get that exact object - or any of its children and descendants of those children - back. Its Parent property is locked, which results in the object never coming back into the game. All events that are attached to this object are disconnected, along with other changes specific to some objects that can speed up your game in some way.

the Remove() method basically does the same thing as setting an object's Parent to nil except that it sets everything inside the object's parents to nil as well. For example, if you were set the Parent property of a model to nil, then anything inside it would still have a Parent property which is not nil. The Remove() method allows you to remove all of the descendants of the object you called Remove() on.
Report Abuse
CitreIthkarr is not online. CitreIthkarr
Joined: 09 Jan 2014
Total Posts: 454
10 Mar 2014 09:12 PM
Remove keeps it around in the lag bank and destroy is less lag
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
10 Mar 2014 09:24 PM
Remove is methodically deprecated.
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