Hello. im making a player camera angle limit and it works fine but the problem is it won’t let me look to the right and i have tried many things but when i tried then it would just screw up something else.
here is my script:
function updateCamera()
RunService:BindToRenderStep("UpdateLoop", Enum.RenderPriority.Camera.Value, function()
local rX, rY, rZ = Camera.CFrame:ToOrientation()
local limX = math.clamp(math.deg(rX), -60, 40) -- up and down
local limY = math.clamp(math.deg(rY), -90, 0) -- left
Camera.CFrame = CFrame.new(Camera.CFrame.p) * CFrame.fromOrientation(math.rad(limX), math.rad(limY), rZ)
end)
end