Copy and change my character

Hello! What am i doing wrong? Could someone help me please?

   local player = game.Players.LocalPlayer

    local char = player.Character or player.CharacterAdded:Wait()

    script.Parent.MouseButton1Click:Connect(function()

    char:Clone()

    end)

I need to make a copy of my character and that when I press the button my character changes to the copy I made

This way my player will look like the copy
How i could do that? :frowning:

I need to change the appearance of the player to the copy I made (the utility that I will give it will be that my character changes so I want to be able to return to its copied form before)

Your cloning the character and its not parented to anythiong. You should make it a variable and set the parent to workspace.

1 Like

Could you help me to do that, please? :frowning:

No sorry. Just make it a variable with local char and then set the parent to workspace.

1 Like

I tried and i am not sure how to do that

You don’t know how to make parent stuff?

An example is:

local part = Instance.new("Part")
part.Parent = workspace

char = Parent.workspace something like this?

No, it needs to be char.Parent because your setting the parent of the character to workspace.

You’ll also need to set Archivable property of your character to true. I believe you just simply set the players character like so, player.Character = your_character
I’m not too sure if this will work though:

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

script.Parent.MouseButton1Click:Connect(function()
    char.Archivable = true
    local clone = char:Clone()
    player.Character = clone
    clone.Parent = workspace
end)

Here is a related thread, you might also need to look into it:

1 Like