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 » Scripters
Home Search
 

Re: Cloning the Player

Previous Thread :: Next Thread 
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
29 Mar 2015 09:21 PM
local Clone = plr.Character:Clone()
Clone:MoveTo(plr.Character.Torso.CFrame*CFrame.new(0,0,-1))

I want to Clone the players character and move it slightly away from the player... Why does this fail?

attempt to index local 'Clone' (a nil value)
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
29 Mar 2015 09:24 PM
repeat wait() until plr.Character ~= nil
local Clone = plr.Character:Clone()
Clone:MoveTo(plr.Character.Torso.CFrame*CFrame.new(0,0,-1))
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
29 Mar 2015 09:28 PM
local plr = game.Players.LocalPlayer
Run = game:GetService("RunService")
enable = false

function DaMove()
repeat wait() until plr.Character ~= nil
local Clone = plr.Character:Clone()
Clone:MoveTo(plr.Character.Torso.CFrame*CFrame.new(0,0,-1))
end

function Animation()

end

script.Parent.Selected:connect(function(m)
m.Button1Down:connect(function()
if enable == false then
enable = true

plr.Character.Torso.Anchored = true

DaMove()
wait(2)
plr.Character.Torso.Anchored = false
enable = false
end
end)
end)

It still returns Clone is a nil value
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
29 Mar 2015 09:29 PM
The character's Archivable property is set to false, meaning you can't clone it.
You can change it though.
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
29 Mar 2015 09:33 PM
plr.Character.Archivable = false
local Clone = plr.Character:Clone()
Clone:MoveTo(plr.Character.Torso.CFrame*CFrame.new(0,0,-1))

still nil
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
29 Mar 2015 09:36 PM
'The character's Archivable property is set to false' i'm a fking idiot
Report Abuse
CardsOfFate is not online. CardsOfFate
Joined: 08 Jul 2014
Total Posts: 761
29 Mar 2015 09:39 PM
Clone:MoveTo(plr.Character.Torso.CFrame*Vector3.new(5,5,5))

This runs but it does not move the Clone it just places them inside my character
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
29 Mar 2015 11:23 PM
umg thats just so wrong on many levels.
You're using MoveTo is Vector3, then you used the torso's CFrame
like umg what i cant even.
Report Abuse
Sevrick is not online. Sevrick
Joined: 22 Oct 2013
Total Posts: 3846
30 Mar 2015 04:03 AM
wtf dude, you own a studio u need to learn lua. go here:

wiki.roblox.com
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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