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: What's wrong with this?

Previous Thread :: Next Thread 
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 03:40 PM
c = workspace["Player913"]:Clone()

c1 = c:GetChildren()
for i = 1,#c1 do
c1 = c1[i]
if c1.ClassName == "Part" then
c1.Anchored = true
elseif c1.ClassName == "Hat" then
c1.Handle.Anchored = true
elseif c1.ClssName == "Tool" then
c2 = c1:GetChildren()
for i = 1,#c2 do
if c2[i].ClassName == "Part" then
c2[i].Parent = c
c2[i].Anchored = true
end
end
end
end
c.Parent = workspace
c:MoveTo(workspace["Player913"].Torso.Position)

I double checked c many times. Still says c is a nil value.
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
25 Sep 2012 03:49 PM
Why are you putting Player913 in brackets?
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 04:04 PM
To make it stand out more.
Report Abuse
Zkiller11 is not online. Zkiller11
Joined: 25 Aug 2009
Total Posts: 2914
25 Sep 2012 04:07 PM
c = workspace.Player913:Clone()

c1 = c:GetChildren()
for i = 1,#c1 do
c1 = c1[i]
if c1.ClassName == "Part" then
c1.Anchored = true
elseif c1.ClassName == "Hat" then
c1.Handle.Anchored = true
elseif c1.ClssName == "Tool" then
c2 = c1:GetChildren()
for i = 1,#c2 do
if c2[i].ClassName == "Part" then
c2[i].Parent = c
c2[i].Anchored = true
end
end
end
end
c.Parent = workspace
c:MoveTo(workspacePlayer913.Torso.Position)

Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
25 Sep 2012 04:07 PM
Why don't you just anchor the torso? >.>

And fix your conditions please :3
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 04:17 PM
Zkiller, fixing the first line makes no difference.

Miz, how so?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
25 Sep 2012 04:18 PM
I'm taking a guess you want it so the player can't move, right?

So why not make it's walkspeed 0 or anchor it's torso?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
25 Sep 2012 04:21 PM
c:MoveTo(workspacePlayer913.Torso.Position)

Sad
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
25 Sep 2012 04:25 PM
Brandon, I don't think you can clone a character...
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 04:26 PM
Miz, I need to CFrame the clone.
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 04:28 PM
Chop, you can clone a model so you should be able to clone a character.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
25 Sep 2012 04:31 PM
Well, when I copy a model of a player in test and try to paste, it doesn't work. When I select the parts,humanoid and other stuff, copy and paste, it works.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
25 Sep 2012 04:32 PM
Because you can't copy/clone a character.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
25 Sep 2012 05:02 PM
Make the Model's Archivable Boolean = true
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 05:33 PM
Oh, would simply making a new model, cloning everything inside the character then pasting it in the new model work then?
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
25 Sep 2012 05:36 PM
Thanks thecaptain, I didn't notice it was disabled by default.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
25 Sep 2012 05:41 PM
No problem, Here to help.
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