Lets say I have code like this :
repeat wait() until game.Players.LocalPlayer.Character
local Player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
while wait() do
camera.CFrame = camera.CFrame * CFrame.Angles(0,math.rad(45),0)
end
The problem with this is that the camera just keeps rotating. I want to find a way to be able to SET the rotation of the camera.
This doesn't work either :
while wait() do
camera.CFrame = CFrame.Angles(0,math.rad(45),0)
end
I'm not sure how to set the rotation itself. to make it point to a specific degree while it's in a loop. Does anyone know how to SET it in a loop?

6 comments
the pos variable is the position of the camera my bad ^
Hi, I'm sorry but this isn't what I'm trying to do. I am trying to set, rather than repetitively adding the radiants to the camera. Just try the script that I've posted and you'll see that it just keeps adding up. I'm trying to SET (not add) the camera rotation to point to a specific radiant.
and also, even if I place parts in which I want to make the camera to point at, I'm trying to make multiple so I can't just do that.
Set a variable of the degree outside the wait() loop then set the rotation on the camera therefore the camera wont continuously change rotation
yeah that's what I did. There is a variable with the degree outside of the loop. But I'm not sure how to set the rotation if i put it in the loop due to the fact that the degrees in that variable constantly changes so the camera has to keep pointing to those degrees.
Why the degrees wont change unless you're multiplying the cframe by another, otherwise the radians are fixed.