Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my cloning script acting weird?

Asked by 8 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

So in the game, I tried to clone a zombie. However, if the torso is not anchored, then the game just puts the cloned model in the original's position. If the torso is anchored, then the cloned model is placed in the game in the intended location. However, even if I tried to unanchor it later on, the moment it is not anchored, it teleports back to the original's position. Just what is going on?

0
Please post the script YellowoTide 1992 — 8y

2 answers

Log in to vote
1
Answered by 8 years ago

Humanoids are weird.

Set the CFrame if the torso whilst it's unanchored.

eg:

zombie = game.Workspace.Zombie:Clone()
zombie.Torso.Anchored = false --Just making sure
zombie.Torso.CFrame = CFrame.new(0, 10, 0) --change the X,Y,Z to whatever
Ad
Log in to vote
-1
Answered by 8 years ago

Thanks for the help, but I figured it out....I was messing around with the Torso, when I should be changing the HumanoidRootPart.

Answer this question