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

Is it possible to have you camera locked on object when spawned?

Asked by 7 years ago

Also I am trying to make it so you can't move the cameraat all it is locked on the object.

0
It's possible to do that. TheeDeathCaster 2368 — 7y

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

Yes. Simply set the Camera's CameraType to Enum.CameraType.Scriptable, and manipulate the CFrame.

Be wary of the following facts:

  • You may only manipulate the Camera from a LocalScript.

  • You need to manually reset it in order to track the character again.

local cam = workspace.CurrentCamera;

cam.CameraType = Enum.CameraType.Scriptable;
cam.CFrame = CFrame.new(vector3origin,vector3look);
Ad

Answer this question