Viewport angle?

So im making a character viewport that I want to look like this:

view

but mine looks like this:

view2

how would I change the angle to make it look like it’s looking to the right?

Script:

local char = game.Players.LocalPlayer.Character
local cam = Instance.new("Camera", script.Parent)
local rs = game:GetService("RunService")

rs.RenderStepped:Connect(function()
	for i, v in pairs(script.Parent.ViewportFrame.char1:GetDescendants()) do
		v:Destroy()
	end
	for i, v in pairs(char:GetChildren()) do
	local v2 = v:Clone()
	if v2:IsA("Script") or v2:IsA("LocalScript") or v2:IsA("ModuleScript") then
		v2:Destroy()
	else
	v2.Parent = script.Parent.ViewportFrame.char1
	if v2:IsA("Humanoid") then
		v2.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		end
	end
end
	script.Parent.ViewportFrame.CurrentCamera = cam
	cam.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,-5) * CFrame.Angles(math.rad(30),math.rad(180),0)
end)

You don’t need a script if you want it to be a set angle.

1.- Move the object to the workspace.
2.- Position your camera the way you want the viewport’s camera to be.
3.- Copy the current camera and past it into the viewport.
4.- Set the viewport’s currentCamera to the copied one.
5.- Place the model in the viewport.

5 Likes

This might work, I haven’t tested it yet. Feel free to tweak some stuff.

cam.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(3,0,-3)

cam.CFrame = CFrame.new(cam.CFrame.Position, game.Players.LocalPlayer.Character.HumanoidRootPart.Position)

1 Like