Cloning character not working

I know this has been posted before, but I couldn’t find any solutions in those posts.


local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local viewport = script.Parent.ScreenGui.ViewportFrame
local camera ="Camera", viewport)
camera.CameraType = Enum.CameraType.Scriptable
camera.Name = "ViewportCamera"
camera.Parent = viewport
viewport.CurrentCamera = camera

--Cloned Character
char.Archivable = true
local cloned_char = char:Clone()
cloned_char.Parent = workspace
cloned_char.Parent = viewport
cloned_char:SetPrimaryPartCFrame(,0,0)* CFrame.Angles(0, math.rad(-180), 0))

camera.CFrame =,0,2)

I’m trying to clone the player’s character into a Viewport Frame. It does end up cloning, but there’s nothing inside it. I even tried to parent it to workspace before parenting it to the Viewport, which worked for someone else, and still nothing.

Output: Model:SetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.

Please help. Thanks beforehand!

Have you tried cloning the contents of the character and putting it in a world model in the viewport that should work!

1 Like

Or it might be because you cloned it In the workspace first, try cloning it in the viewport first

1 Like

I would do that but when cloning, what should happen is that it clones all of its descendants too.

Let me see if all the objects inside are archivable. They should be though.

Edit: They all are and still nothing.

1 Like

Hey iv not posted here before but I believe its because you need to enable archivable on the model itself :slight_smile: