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: Removing objects with spaces in names.

Previous Thread :: Next Thread 
ultimate055 is not online. ultimate055
Joined: 23 Sep 2012
Total Posts: 363
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 is not online. 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 is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
15 Feb 2014 01:00 AM
workspace["Clone Tool"]:Destroy()
Report Abuse
ultimate055 is not online. ultimate055
Joined: 23 Sep 2012
Total Posts: 363
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
ultimate055 is not online. ultimate055
Joined: 23 Sep 2012
Total Posts: 363
15 Feb 2014 01:00 AM
Nevermind. It got answered. Thank You wazap!
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Feb 2014 01:02 AM
Aw wazap,ur too fast,u beat me to it by a mile :o
Report Abuse
Hazania is not online. 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 is not online. 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 is not online. 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 is not online. 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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Feb 2014 01:12 AM
Wazap,plzzz let me answer this one :P
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Feb 2014 01:14 AM
Typos..
Pun*
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
15 Feb 2014 01:15 AM
game.Players.LocalPlayer.Backpack:ClearAllChildren()

I still win.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Feb 2014 01:16 AM
Dang your good
Didn't even think of that..nice one
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
15 Feb 2014 01:17 AM
Leedle, I lol'ed
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