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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 30 Sep 2014 09:38 PM |
http://codepad.org/N9E0l8Pw
If I didn't mess something up, that should work. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
| |
|