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

How do I change the side the camera is looking at?

Asked by 5 years ago

So I am making a script that makes the camera look at one place but when ever I try to do this the camera keeps looking in the opposite direction so I am looking for a script that will make it face the right way.

Here's the script:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.LocalScript:clone().Parent = character
    end)
end)
local cam = workspace.CurrentCamera
cam.CameraSubject=workspace.Part
cam.CameraType = "Attach"
cam.CoordinateFrame=CFrame.new(2869.235, 82.092, -2385.386)
cam.Focus=CFrame.new(2869.235, 82.092, -2385.386)

Thanks

1 answer

Log in to vote
0
Answered by
Narunzo 172
5 years ago

You could try doing

cam.CFrame=CFrame.Angles(math.rad(degrees X),math.rad(degrees Y),math.rad(degrees Z))

That will aim the camera at the radius's you set for each angle.

Ad

Answer this question