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
 

Attempt To Call Method Clone A nil value?

Previous Thread :: Next Thread 
TheComputerist is not online. TheComputerist
Joined: 28 Oct 2011
Total Posts: 695
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
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 07:53 PM
GetChildren() retrieves the table, :Clone() is for Cloning an individual "Child" of the table.
Report Abuse
maxomega3 is not online. 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
TheComputerist is not online. TheComputerist
Joined: 28 Oct 2011
Total Posts: 695
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
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 08:09 PM
Try looping through the "Parent" and changing the "Parent" of all of the "Children" from there.
Report Abuse
TheComputerist is not online. TheComputerist
Joined: 28 Oct 2011
Total Posts: 695
08 Jul 2014 08:10 PM
I fixed it!
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