|
What is the differences between :remove() and :Destroy()?
And which one is better to use? |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
:Remove() temporarily removes it... You 'have' to bring it back.
:Destroy() destroys it forever. no need for returning it. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
remove is deprecated. use destroy. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
and blox you dont have to bring it back - but a reference to the removed brick can be enough to bring the removed brick back into workspace |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
|
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
I know you don't HAVE to, but you should use remove if you WANT to return something. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
@blox true. |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
I prefer to use nil in every way possible lol. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
i wonder why roblox would create :destroy and :remove if nil exists |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Destroy sounds cool, that's why.
"I WILL DESTROY YOU!!!!!!!!!"
"I WILL... set your value to nil... :/" |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Lmao!
Man I swear you are funny dude. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
@blox
very, very true.
im going to use destroy() now |
|
|
script.Parent = nil
print("nil")
wait(3)
script.Parent = Workspace
print("workspace")
script:Destroy()
print("nil")
wait(3)
script.Parent = Workspace
print("u got an error bro, destroy locks parent to nil, as well as all children, while remove parents to nil, but doesn't lock, and any children can be retrieved, btw, youll never see this message, also, remove is depreceated") |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Even though Destory() sounds cooler.
Try
"if h == :Destory() then"
And then see what happens |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Well that's because there is not method called ':Destory()'.
i see through your tricks >:I |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
^_^ |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
So, whats :Destory() of ROBLOX? Who connived the idea of it? |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
destory sounds like a cool word |
|
|
Remove() still leaves the object there. Which may lag the server.
Destroy() completely removes it. |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
wtf is connived?
I wrote conceived. |
|
HuntHelloJoin Date: 2011-01-19 Post Count: 577 |
@black in both cases the block's parent is still nil, so it technically isnt there, but
-now that i think of it, it kinda is |
|
connor954Join Date: 2008-07-24 Post Count: 947 |
Remove is helpful for hints you wanna bring back like this
function Blue()
local H = Instance.new("Hint")
H.Parent = game.Workspace
H.Text = "Blah"
wait(10)
H:Remove()
wait(10)
end
Blue()
Blue()
Well, I guess same with destroy, but you get my p |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
'Destroy sounds cool, that's why.
"I WILL DESTROY YOU!!!!!!!!!"
"I WILL... set your value to nil... :/"'
I would rather be destroyed than set to nonexistant. |
|
|