I have a game where the player goes upside down but I want the camera to look right side up, I've tried lots of things to no avail.

this is what I'm using right now:

RunService:BindToRenderStep (
    "camera", 
    Enum.RenderPriority.Camera.Value,
    function ()
        Camera.CFrame = CFrame.new((root.CFrame * CFrame.new(0, 5, 10)).p, root.CFrame.p) 
    end
)

it works partly but gets wonky when I go upside down