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

Why am I unable to clone a player character?

Asked by 1 year ago

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

Log in to vote
1
Answered by
OhManXDXD 445 Moderation Voter
1 year ago

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)
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. XxTrueDemonxX 362 — 1y
Ad

Answer this question