I know this has been posted before, but I couldn’t find any solutions in those posts.
Client:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local viewport = script.Parent.ScreenGui.ViewportFrame
local camera = Instance.new("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
wait(1)
cloned_char.Parent = viewport
cloned_char:SetPrimaryPartCFrame(CFrame.new(0,0,0)* CFrame.Angles(0, math.rad(-180), 0))
camera.CFrame = CFrame.new(0,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!