Quick Camera rotation question!

I have a FPS player and when I look left and right, the camera slightly tilts as if a persons head is tilted but it stays that way unless i keep turning unti its back to being straight but then the problem happens again and again. Is there a way to lock the cameras rotation cause i dont know what caused my camera to rotate basically in a circular not linear way

You can toss a 1-line script on the camera that sets the Z-axis rotation to “0” in the update function, if you like. The better solution might be to set that restriction in the script where the rotation is occurring though, and not as a hard-value on the camera. Just keep in mind that it’s the “Z”-rotation that tilts the camera in that way, and overwrite the Z-rotation value as the new value is being calculated.