I’m trying to quickly rotate the players camera 180 degrees no matter where they currently have the camera.
When the player is looking up it flips down and in reverse when doing the 180.
I’ve tried messing with the Y and Z but it still ends up doing the same thing. I’ve also tried searching the forum but couldn’t find any similar problems.
Here is the current code
local camera = workspace.CurrentCamera
workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(180), 0,0)
This turns my camera upside down instead of spinning around to the other side of the character. Tried tweaking the other variables but they make the camera go nuts.
This is happening because you’re rotating the camera 180 degrees relative to its current CFrame. You’re wanting to rotate the camera 180 degrees globally instead of locally. No clue if that makes sense, but what you’d do is apply the current CFrame for the camera after the rotation.