Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Locking camera orientation to root part?

Asked by 5 years ago

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

Answer this question