Hello DevForum, this is a basic question I’m having trouble finding the answer for. Essentially what I’m trying to accomplish is setting the player’s current camera to face the given direction (Vector3 or etc.) I’m sure this is an easy problem I just couldn’t find any resources on how to do this. What I’m assuming needs to be done is set the cameras CameraType or CameraSubject to said value. What I have so far is a LocalScript located in StarterPlayerService with the camera defined. I’ve been messing around with it’s properties to no avail. Any help is appreciated, thanks in advanced.
You can do this by using the constructor CFrame.new(a, b)
where a is the position of the object you want the object to be set to, and b is the position you want the object to look at (points the front face of the object in the direction of the position). A and b both have to be Vector3’s.
local camera = workspace.CurrentCamera
local pos = your Vector3 here
camera.CFrame = CFrame.new(camera.CFrame.Position, pos)