|
| 15 Feb 2014 12:54 AM |
How can I remove an object named "Clone Tool" from the workspace.
workspace.Clone Tool:remove() shows up as an error. |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 15 Feb 2014 12:59 AM |
Well if you want to remove all those starter tools just
a=game.Players.LocalPlayer.Tools:GetChildren() a:destroy() |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 15 Feb 2014 01:00 AM |
| workspace["Clone Tool"]:Destroy() |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:00 AM |
| I know how to do that, but I don't want all tools removed. How do I remove objects with spaces in their names! |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:00 AM |
| Nevermind. It got answered. Thank You wazap! |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:01 AM |
Two ways FindFirstChild And putting it in brackets So like this: A = Workspace.findFirstChild("one two three!") A:remove() Or A = Workspace["one two three!"] A.remove() |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:02 AM |
| Aw wazap,ur too fast,u beat me to it by a mile :o |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 15 Feb 2014 01:02 AM |
| Sweet wazap, I wasn't even aware of that solution! xD |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 15 Feb 2014 01:05 AM |
3rd way that no one mentioned so far
workspace:WaitForChild("Clone Tool"):Destroy()
Also Haz Your script wont work.
|
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 15 Feb 2014 01:10 AM |
| Then hang me. Lol was it the way I used local player? |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 15 Feb 2014 01:12 AM |
No, :GetChildren() returns a table
You are attempting to remove a table using :Destroy(). Will return a error. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:12 AM |
| Wazap,plzzz let me answer this one :P |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:13 AM |
for kg,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do b:destroy() end
--also made a little put with "kgb" there,lol |
|
|
| Report Abuse |
|
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 15 Feb 2014 01:15 AM |
game.Players.LocalPlayer.Backpack:ClearAllChildren()
I still win. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 01:16 AM |
Dang your good Didn't even think of that..nice one |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
| |
|