Here's how I made it stop going left and right:

local cam = workspace.CurrentCamera
cam.CameraType = "Attach"

But I also need to to stop going up and down.