Issues remove camera limit function

Hello, I would like to remove the limit of the camera in a function, could someone give me a hand? :pray:

I have this function that limits the camera but I would like to have the other one to remove this limit, any idea how to do it?

-- Camera limitations function
local function limitCameraUpDown(minVal, maxVal)
	RunService:BindToRenderStep("UpdateLoop", Enum.RenderPriority.Camera.Value, function()
		local minCameraVal = minVal
		local maxCameraVal = maxVal
		local rX, rY, rZ = camera.CFrame:ToOrientation()
		local limX = math.clamp(math.deg(rX), minCameraVal, maxCameraVal)
		camera.CFrame = CFrame.new(camera.CFrame.p) * CFrame.fromOrientation(math.rad(limX), rY, rZ)
	end)
end

local function removeLimitCameraUpDown(minVal, maxVal)
	RunService:BindToRenderStep("UpdateLoop", Enum.RenderPriority.Camera.Value, function()
		local minCameraVal = minVal
		local maxCameraVal = maxVal
		-- do something...
	end)
end

Simply unbind from renderstep:

RunService:UnbindFromRenderStep("UpdateLoop")
1 Like

Thanks you bro lol!! :smiley: i didn’t know xD

1 Like