script.Parent.MouseButton1Click:Connect(function()
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
if camera.CameraSubject == player.Character.Humanoid then
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.new(Vector3.new(751.572, 11.136, 95.67), Vector3.new(0, 90, 0))
end
end)
The camera isn’t rotating properly when modifying the 2nd vector.
CFrame.new Should be treated like CFrame lookAt when passing 2 Vector3 arguments.
First you want the Position Instead.
local Position = Vector3.new()--Position Here
local Angle = CFrame.Angles()--Angle here remember math.rad()!
local CFrame = CFrame.new(Position) * Angle
If you want to know more about how the function work then CFrame | Roblox Creator Documentation Document has the list of what functions you can use.