Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script that clones roblox characters won't work, I need a fix, any help please?

I'm trying to make a script that clones like, people, y'know models of roblox characters noobs actual people etc, but I can't get it to work, I want to use a table by the way. Heres the code.

local boys = {game.ServerStorage:FindFirstChild("C H I L L"), game.ServerStorage:FindFirstChild("Am I going to die?")}

`local boys = {game.ServerStorage:FindFirstChild("C H I L L"), game.ServerStorage:FindFirstChild("Am I going to die?")}

while true do

wait(math.random(.1, .1))

local guy = boys[math.random(#boys)]

guy:Clone().UpperTorso.Position = script.Parent.Position

guy.Parent = workspace

guy.die.Disabled = false

end`

1 comment

0

You want to clone a whole character of a player yes?

1 answer

Archivable

Make sure your models are Archivable before cloning them. Archivable is a property that allows objects to be cloned. If it is set to false and you try to clone, it will return nil.

Note: Player.Character have Archivable usually set to false. If you wanted to clone a Player, you'd need to set Archivable to true and then clone.

Cloning

What we are trying to achieve with cloning in this case is having one character be the original while the rest are copies of only the original.

local original = workspace.Dummy

local clone = original:Clone()
clone:MoveTo(Vector3.new(0,0,0))
clone.Parent = workspace

Note: When cloning, the object's parent is set to nil. You have to parent it somewhere, in this case it would be the workspace.

Here we are keeping the original unmoved and unmodified, only modifying the clone. However if you were to modify the original, it would change the new clones created.

What you seemed to do with your script is modify the original. You cloned a model and changed its position, but never parented it to the workspace. You then parented the original into the workspace when it should've been the clone.

This discussion is preserved as it was. New answers, comments, and votes are closed.