How to Make a Controllable Camera

From Legacy Roblox Wiki
Jump to navigationJump to search

Getting and Controlling the Camera

To get the camera of a specific player, you must use a LocalScript to access the players' camera. The most convenient way to access a certain player's camera is by using the CurrentCamera property of workspace. You can then modify the properties of the camera as you please through this local script.

Example
repeat wait() until game.Workspace.CurrentCamera --Wait for the camera to load if it hasn't already
local cam = game.Workspace.CurrentCamera --Get the camera and store it as a variable
cam.CameraSubject = game.Workspace.Part --Change the camera's subject to a part in workspace

Here we changed the player's camera subject to a part in workspace.


See Also