It’s because ccflv.Y is a read-only property of the LookVector (Vector3) you can’t modify individual components of a Vector3 directly, we need to create a new Vector3
local cam = workspace.CurrentCamera
local ccflv = cam.CFrame.LookVector
local y = math.clamp(ccflv.Y, -0.8, 0.8)
local newLookVector = Vector3.new(ccflv.X, y, ccflv.Z)
clamps the Y component of the LookVector between -0.8 and 0.8, creates a new vector with the adjusted Y