hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 24 Feb 2015 11:48 PM |
a = script.thing:clone()
children = script.Parent.Parent:GetChildren() for i =1, #children do if children[i] ~= nil then if children[i]:IsA("VehicleSeat") then a.Parent = <- What do I put there? end end end
I'm blue I'm in need of a guy, If I were green I would die, I repeat I would die, I got more apple pie, Bacon I fry. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 12:11 AM |
a.Parent = <- What do I put there?
You put where you would like the clone of the "thing" being cloned inside of the script to go. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 12:15 AM |
children = script.Parent.Parent:GetChildren() for i =1, #children do if children[i] ~= nil then if children[i]:IsA("VehicleSeat") then local a = script.(WHAT YOU WANT TO CLONE HERE):Clone() a.Parent = (WHERE YOU WANT WHAT YOU CLONED TO END UP) end end end
I am assuming that you want to clone the items in the script's Parent.Parent in which case: for i =1, #children do if children[i] ~= nil then if children[i]:IsA("VehicleSeat") then local a = children[i]:Clone() a.Parent = (WHERE YOU WANT WHAT YOU CLONED TO END UP) end end end |
|
|
| Report Abuse |
|
|
hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 25 Feb 2015 05:54 PM |
NoNo, I need to clone into the children e.g
a = script.Parent:clone() a.Parent = Children if you get me?
I'm blue I'm in need of a guy, If I were green I would die, I repeat I would die, I got more apple pie, Bacon I fry. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 06:07 PM |
Loops.
:Clone(), not :clone() |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 06:08 PM |
| Clone the thing inside the loop |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2015 06:19 PM |
a=script.Thing:Clone()
children=script.Parent.Parent:GetChildren() for i = 1, #children do if children[i] ~=nil then if children[i]:IsA('VehicleSeat') then a.Parent= script.Parent.Parent:FindFirstChild(tostring(children[i]) end end end
This will work. Sorry for the confusion m8 |
|
|
| Report Abuse |
|
|