|
| 17 Nov 2012 12:59 PM |
workspace.Part.Parent = nil, workspace.Part:remove(), workspace.Part:Destroy(), Derbis, workspace.Part = nil
(Also if there is more ways, Can someone tell me?)
Can someone explain each one?
I know workspace.Part.Parent = nil Makes it not have a parent...So would this work?
Brick = workspace.Part while true do wait(0.03) Brick.Parent = nil wait(0.03) Brick.Parent = workspace end
And remove(), I cant tell. As far as I know its the same as Destroy() (But everyone says Destroy() is better so I always use it)
For Destroy() I dont see why not just use remove()
And I know almost nothing about Derbis but it deletes bricks or something?
workspace.Part = nil makes the part nil, Meaning nothing, Right? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:02 PM |
remove() is the same as Parent=nil Destroy() sets it to nil and Locks it, Reducing Lag. |
|
|
| Report Abuse |
|
|
Toby12600
|
  |
| Joined: 01 Mar 2011 |
| Total Posts: 193 |
|
|
| 17 Nov 2012 01:04 PM |
Here is a remove thingy to kick somebody :P game.Workspace.(Player):Remove() |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:07 PM |
@Toby game.Players.(Player):Destroy() |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:23 PM |
Bump I wanna know about all of them. And whats best for removing a part you want gone forever? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:26 PM |
| game.Workspace["Part"]:remove() |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:26 PM |
game.Debris:AddItem(Part,5 --[[ Removes after 5 seconds, best for local scripts ]] Part:Destroy() --[[ Removes the part instantly, and removes all connections and events associated with it. ]] Part:Remove() -- Makes it's parent nil Part.Parent = nil -- I prefer just Part:Remove() |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:29 PM |
@1Topcop game.Debris:AddItem(Part,5
Why not just say wait(5) workspace.Part:remove() ? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:31 PM |
:Destroy() is what you use if you never ever ever ever want the object again.
x.Parent = nil is what you use if you don't want the part to be gone forever. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:33 PM |
Because AddItem creates a coroutine and will work even after the script is gone. Crazyman32 pointed out the other day (which I already knew) that if a player leaves and is using a LocalScript, if he had a wait(Time) then Part:Remove() the part would never remove, because it was waiting when it got destroyed. With the AddItem method, it will remove even when the script is no longer existent. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:33 PM |
@Free So this would work? Brick = workspace.Part while true do wait(0.03) Brick.Parent = nil wait(0.03) Brick.Parent = workspace end
And do scripts with a parent of "nil" run? (I would guess not, But Im still asking) |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:36 PM |
If they start out in workspace, then yes.
script.Parent = nil for n=1,5 do wait(1) print("I'm still running even after "..n.." seconds!") end print("And I will always run *_*")
Also good to know, wait() waits the shortest amount of time possible (which is normally .03 seconds) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 01:37 PM |
@1Topcop I was told you could change the wait() in your studio settings causing some scripts to wait longer, And break
So I just use wait(0.03) |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Nov 2012 01:38 PM |
| Well it would only be effective on LocalScripts, and if anyone messes with it, they get what they deserve. x3 |
|
|
| Report Abuse |
|
|