Y and Z adding together in orientation

TL;DR: Y and Z of the orientation adding together making the y the sum of those 2 and z = 0, need help.

I have never seen anything like this and cannot find anything online. Basically what
I need is for the camera’s cframe to be on the parts cframe.

Here is my code, and the resulting Orientation.
local player = game.Players.LocalPlayer local char = player.Character local camblock = Instance.new("Part",workspace) local cam = workspace.CurrentCamera camblock.Name = "Cam" camblock.Anchored = true camblock.Orientation = Vector3.new(-90, 90, 60) cam.CameraType = Enum.CameraType.Scriptable while true do camblock.Position = char:WaitForChild("HumanoidRootPart").Position + Vector3.new(10,15,0) cam.CFrame = camblock.CFrame task.wait(.001) end

image

I have tried editing the orientation while the script is running but it still makes y the sum of y and z and making z = 0

Non of my more experienced friends can help me and I am stuck. Anything would help, Thank You.

Looks like you’re getting gimbal lock. XYZ rotations aren’t great for describing rotation because they don’t contain enough information. You should look into CFrame.fromAxisAngle or quaternions for rotations.

I think Roblox changed their position in studio recently. If you try to set the Y (or X or Z) position for multiple parts, it screws up their positions entirely.