Clone of player's character not working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to create a clone of the player’s character that joins

  2. What is the issue? Include screenshots / videos if possible!
    The clone of the player’s character is just a model, which contains no children

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I couldn’t find anything on it, I also couldn’t really find any alternatives to fix it. I think the error has something to do with the children of the player’s character not being archivable, but I’m not sure how to affect all instances to be archivable

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

I am creating a clone of the character so I can create a cutscene where it’s character-specific
It’s also in a local script

-- 
local camera = workspace.CurrentCamera
local partCamera = game.Workspace.CameraThing
local animation = script.Animation


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

character.Archivable = true

local cloneCharacter = character:Clone()
cloneCharacter.Parent = game.Workspace
cloneCharacter.Name = "Dummy"

local humanoid = game.Workspace:WaitForChild("Dummy"):WaitForChild("Humanoid")
local animate = humanoid:LoadAnimation(animation)


wait(10)
animate.Looped = false

animate:Play()
cloneCharacter.Position = Vector3.new(-18.945, 3.368, -5.97)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = partCamera.CFrame

wait(10)
camera.CameraType = Enum.CameraType.Custom

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Maybe you can try and add a small wait() right before you clone the character, also, to change the position of the character, make sure you change the model’s PrimaryPart position instead of the model itself, which that would most likely be the HumanoidRootPart.
Do cloneCharacter.PrimaryPart.CFrame = CFrame.new(-18.945, 3.368, -5.97)

4 Likes

I got the same issue when I tested the script, the wait() made it work for me.

Thank you, I didn’t realize you have to add a wait() before cloning
Thanks!

1 Like

Correction on something, do cloneCharacter.PrimaryPart.CFrame = CFrame.new(-18.945, 3.368, -5.97) to change the position of the dummy, else it won’t work.

cloneCharacter.HumanoidRootPart.CFrame = CFrame.new(pos) * CFrame.Angles(0,math.rad(90),0)
Is this good?

1 Like

Yes this is good, it will work as intended.