# Rotate Camera with tween while keeping position

1. What do you want to achieve?
all I want is to tween the orientation of the camera without tweening the position via CFrame

2. What is the issue?
The code i have does tween the camera’s rotation, however since I’m forced to use CFrame as the tween value it also keeps the camera stationary when the tween starts when i only want to rotate it but keeping its position on the character

3. What solutions have you tried so far?
pretty much a skim on devforum, and the wiki to see if it was possible to change the rotation of the camera without using the same statement i see everywhere:

``````Cam.CFrame *= CFrame.Angles(--values)
``````

Here’s my line of code pretty much

``````tweenService:Create(cam, camInfo, {CFrame = cam.CFrame * CFrame.Angles(math.random(-1, 1), math.random(-1, 1), 0)}):Play()
``````

I have no other ideas and I’m pretty much at loss as usual.

tl:dr?
my camera stops following character when tween plays which is not ideal.

1 Like

this should be going from -180 to 180. Also, use math.rad.

``CFrame.Angles(math.rad(math.random(-180, 180)), math.rad(math.random(-180, 180)), 0)``

Trust me, I’m fully aware about radians and rotational values. The issue is that when the tween plays, while yes it rotates, but it also stays in place until the tween is done and then places the position back onto the character.

1 Like

Oh, well, you might want to be using a repeat instead.

``````local origx, x= math.random(-180, 180), x
local origy, y = math.random(-180, 180), y
local timer = 5 --seconds
local hasbeen = 0

repeat