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

How do i clone players in a cloning script?

In roblox what is the process of cloning a player?

1 answer

✓ Accepted answer

If you mean cloning characters, you can. However if you mean cloning a player you cannot unfortunately. According to the developer wiki, the Player instance cannot be created, this includes Instance.new() and Clone()

You could clone characters technically because its a model and models can be created using both Instance.new() and Clone().

game:GetService("Players").PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character.Archivable = true
		Character:Clone().Parent = workspace
	end)
end)

In the code above we have two events, one for when the player joins and another for when the character is created. When the CharacterAdded event is fired we immediately clone the Character and parent it into the workspace. That's about it really.

4 comments

0

You forgot to set character.Archivable = true

0

Oh yeah thanks for catching that

0

How would I make this for a specific player?

0

Oh, create a conditional in which it checks if the Player that joined has the same userId as the specified player's UserId, and then if that statement is true then the code above will execute.

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