This should look out from a part called CamPart at a Part called FocusPart, instead it just looks at the CamPart from far away.
This is a LocalScript in StarterPack
game.Workspace.CurrentCamera.CameraType = "Scriptable" game.Workspace.CurrentCamera.CameraSubject = game.Workspace.CamPart game.Workspace.CurrentCamera.Focus=CFrame.new(-13, -54.5, 40)
From the wiki page for CameraSubject:
A Model, Part, or Humanoid for the camera to look at. Setting this property will override the Focus property.
Furthermore, neither CameraSubject
nor Focus
will work at all when the CameraType
is set to Scriptable
.
To make this work properly, set the CameraType
to Scriptable
, then set its CoordinateFrame
to a CFrame starting at CamPart, looking at FocusPart.
wait(1) local Camera = game.Workspace.CurrentCamera local CamPart = game.Workspace:WaitForChild("CamPart") local FocusPart = game.Workspace:WaitForChild("FocusPart") Camera.CameraType = "Scriptable" Camera.CoordinateFrame = CFrame.new(CamPart.Position, FocusPart.Position) -- constructs a CFrame starting at CamPart, looking at FocusPart