Instead of setting the camera’s CFrame to the CamPart’s CFrame, make a new Vector3: Y and Z take from Drone.CamPart.WorldCFrame, and X also takes from it but you put it through math.clamp to have the value stay between your specified limits.
camPartCFrame = Drone.CamPart.WorldCFrame -- Storing this as a variable to lighten the size of the next line.
camera.CFrame = Vector3.new(math.clamp(camPartCFrame.X, <minVal>, <maxVal>), camPartCFrame.Y, camPartCFrame.Z)
Your CFrame is going to be composed of the position and rotation. Since the position is just your camera part’s position, you can do the following:
CFrame.new(camPartCFrame.Position) -- CFrame.new(position: Vector3) is one of a few ways to use this method.
And then the rotation follows what we described in the previous message, but correctly.
xRot, yRot, zRot = camPartCFrame:ToEulerAnglesXYZ() -- Gets the rotation values in radians.
CFrame.fromEulerAngles(math.clamp(xRot, math.rad(<minVal>), math.rad(<maxVal>), yRot, zRot) -- math.rad is used so your bounds can be input as degrees.
Then to combine the position CFrame and the rotation CFrame together you multiply them together with *. And that combined CFrame is what you set the camera CFrame to.
Does it look any better if you were to rotate the attachment up and down instead of the drone part? This is the approach I took in Godot with first-person cameras, and I’m thinking that it’s choppy because your attachment is rotating around a point (the camera model’s origin I think) instead of just rotating on itself.
Sorry for not replying sooner, for some reason I wasn’t notified of this. I’ll be checking back regularly for updates.
Edit: Disregard everything I just said. I misinterpretted again.
Edit: Actually don’t disregard everything I just said. The fact that the attachment was called CamPart threw me off lol
Ok, so going off the assumption that the jitteriness of the camera is because the attachment is rotating about the origin of the model, could you see if the jitter subsides if the attachment is positioned at the origin?