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: Clone All Into Lighting

Previous Thread :: Next Thread 
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 09:04 PM
I need to clone every single item with the names Copper, Iron, and Coal from workspace into lighting, then delete them, and I don't really know how to get every single item named Copper, Iron, and Coal. This is what I've come up with, but I know it doesn't work.

local Rocks = game.Workspace:getChildren("Copper","Iron","Coal")
local Cloner = Rocks:Clone()
Cloner.Parent = game.Lighting
Rocks:Destroy()

Could someone show me how to make it work?
Report Abuse
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 09:32 PM
What the heck? It says this thread has one response already, but there's no response...
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
30 Sep 2014 09:36 PM
i tried 2 respond but ROBLOX filtered my post

idk why, no ToS violated but eh


#Whales
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
30 Sep 2014 09:38 PM
http://codepad.org/N9E0l8Pw

If I didn't mess something up, that should work.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
30 Sep 2014 09:41 PM
Don't put things in Lighting, put them in ServerStorage or ReplicatedStorage. Lighting is deprecated as a storage method.
Report Abuse
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 09:42 PM
What are ServerStorage and ReplicatedStorage? Just places to store stuff?
Report Abuse
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 09:48 PM
It says that a ... cant be used outside of a vararg function
Report Abuse
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 09:49 PM
On line 6.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
30 Sep 2014 09:56 PM
for i, v in pairs(workspace:GetChildren()) do
wait()
if v.Name == "Copper" or v.Name == "Iron" or v.Name == "Coal" then
v:Clone().Parent = game.ReplicatedStorage
v:Destroy()
end
end
Report Abuse
drgn42 is not online. drgn42
Joined: 11 Feb 2010
Total Posts: 3231
30 Sep 2014 10:01 PM
Thanks tons, It means a lot. And thanks for making it a lot simpler. Haha.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
30 Sep 2014 10:04 PM
yep
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
30 Sep 2014 10:20 PM
lol fine
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