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

Why am I unable to clone a player character?

After messing with some things I notice I'm not able to clone a player's character at all with :Clone().

game:GetService("Players").PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		wait(3)
		print("Timer start")
		local clone = char:Clone()
		
		wait(5)
		clone.Parent = workspace
		print("Clone created")
	end)
end)

I wrote up this quick script to make sure that I wasn't messing something up in my original script but nothing. It errors as soon as it tries to assign the clone's parent to the workspace. When I try this with anything other than a player character it works perfectly. I have tested it printing the "char" and "clone" values after they're assigned and while "char" does show as the player character, the "clone" always shows as nil. So, for some reason the act of trying to clone the player's character is just completely locked out. Am I missing something about this? This never used to be an issue in the past.

1 answer

✓ Accepted answer

You have to set your Character's Archivable property to true to clone it (I don't know why)

See if this helps

game:GetService("Players").PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        wait(3)
        print("Timer start")
        char.Archivable = true
        local clone = char:Clone()

        wait(5)
        clone.Parent = workspace
        print("Clone created")
    end)
end)

1 comment

0

Yea. I later found this out after I did a lot more digging. Not sure when that changed considering I never touched the archivable property before and was able to clone just fine. Guessing it has something to do with all the talk of bugs and exploits I found that kept popping up when looking into it.

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