Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I know how to position the camera, but how do I rotate it?

Code I have so far:

local target = workspace.target_boi 
local camera = workspace.CurrentCamera 
camera.CameraType = Enum.CameraType.Scriptable 
camera.CameraSubject = target 
camera.CoordinateFrame = CFrame.new(target.Position, CFrame.Angles(-22.5))

I know how to put the camera in one spot, but when I test the game, the camera just goes to the ground. It doesn't stay in the air, where the target_boi is (position is 42, 25.843, 54.63).

If I type in target.orientation into where it says CFrame.Angles(-22.5), it rotates itself to the left, no matter how much I change the orientation of the target_boi.

What am I doing wrong?

1 answer

✓ Accepted answer

Camera.CFrame = Camera.CFrame * CFrame.Angles(0,0,0)--Numbers here!

---Thats how you rotate the camera!

1 comment

0

Thx for the Accept! :D !

This discussion is preserved as it was. New answers, comments, and votes are closed.