|
| 12 Apr 2015 09:47 AM |
| I'm wondering because if parenting to nil takes up ram I'll have to change my whole code. Does this effect anything? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 09:48 AM |
Yes. Destroy is more efficient. If you were going to parent it to nil to remove it, just use :Remove(). But that is deprecated, and Destroy should be used instead.
By the way, just use find and replace. |
|
|
| Report Abuse |
|
|
Cuyler
|
  |
| Joined: 27 Feb 2006 |
| Total Posts: 3784 |
|
|
| 12 Apr 2015 09:48 AM |
Parenting to nil does not add it to the Garbage Collection table.
If you want to replace all your .Parent = nil then you can press ctrl + H in Studio and fill in the Replace and Replace With boxes, then click "Replace All." |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 09:49 AM |
| Or if you use find and replace on any decent text editor, you can also use regular expressions. |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 09:49 AM |
| I'm pretty sure you can still recover something that is in nil so it will still be there, just not physically, putting something in nil doesn't delete it unlike :Destroy() |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 09:57 AM |
| Ugh my code is a mess. I made it when I was really tired so it's all just messed up, and find and replace wouldn't help me. It's the actual functioning of the script xd |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 12 Apr 2015 10:18 AM |
Yeah you should only parent it to nil if you want to take it back out at a later time.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|