|
| 08 Jul 2014 07:51 PM |
The output keeps saying Attempt to call method clone a nil value. Here's the script:
function charlooks() looks = script:GetChildren() for i, v in ipairs(game.Players:GetChildren()) do for t, k in ipairs(Workspace[v.Name]:GetChildren()) do if k:IsA("Shirt") then k:Destroy() end if k:IsA("Pants") then k:Destroy() end if k:IsA("Hat") then k:Destroy() end end lo = script:GetChildren() lo2 = lo:Clone() lo2.Parent = v.Character end end charlooks() |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2014 07:53 PM |
| GetChildren() retrieves the table, :Clone() is for Cloning an individual "Child" of the table. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 08 Jul 2014 07:54 PM |
| Just clone the parent rather than all the children |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2014 07:56 PM |
| Yes but I want the script to clone the children and put the children in another parent |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2014 08:09 PM |
| Try looping through the "Parent" and changing the "Parent" of all of the "Children" from there. |
|
|
| Report Abuse |
|
|
| |
|