Viewport Frame [Oreintation]

--//Services
local Players = game:GetService("Players")
--// UI Variables
local plr = Players.LocalPlayer
local PlayerGui = plr:WaitForChild("PlayerGui")
local MainUI = PlayerGui:WaitForChild("MainUI")
local Frame = MainUI:WaitForChild("Frame")
local Frame1 = Frame:WaitForChild("Frame")
local ViewportFrame = Frame1:WaitForChild("ViewportFrame")


local Char = {}
	function Char:CharDisplay()
		local camera = Instance.new("Camera")
		local Character = script.StarterCharacter:Clone()
	local Pos = Character.PrimaryPart.Position
	local Ori = Character.PrimaryPart.Orientation
		ViewportFrame.CurrentCamera = camera
		Character.Parent = ViewportFrame
		camera.CFrame = CFrame.new(Vector3.new(Pos.X, Pos.Y, Pos.Z + 5), Pos)
	end


	function Char:Int()
		self:CharDisplay()
	end
return Char


How can I make it look at the camera? Like just dead looking at you.

It looks like the problem you’re having is the +5 for Pos.Z changes based on the orientation of the character. If this is the problem, you can fix it by moving the cloned character to a set point. (As this is a clone, I’m assuming position/rotation in space don’t matter, if they do you can use cf:ToWorldSpace().)

    Character:SetPrimaryPartCFrame(CFrame.new(0, 0, 0))
ViewportFrame.CurrentCamera = camera
Character.Parent = ViewportFrame
camera.CFrame = CFrame.new(Vector3.new(0, 0, 5), Vector3.new(0, 0, 0))