Customizing the Camera


Roblox offers several built-in options for configuring the game’s camera, along with the ability to script a more /articles/Camera manipulation|customized camera system.

Built-In Settings

Common camera settings can be configured directly within Roblox Studio:

  1. In the Explorer window, select the StarterPlayer object.

  2. In the Properties window, scroll down to locate the Camera section. Using these options, you can easily configure your game’s camera.

Zoom Distance

Together, CameraMaxZoomDistance and CameraMinZoomDistance set the span in which players can zoom the camera in respect to their player character. Setting a very high maximum like 500 will let players zoom the camera far out in space.

If you want to lock the camera to a specific distance away from the player, set both of these properties to the same value.

Camera Mode

The CameraMode property sets the overall behavior of the camera:

Setting Description

Classic The classic Roblox camera which allows players to zoom in and out (unless zoom is locked) and rotate the camera around the player.

LockFirstPerson Locks the camera to first-person mode. When in this mode, all parts/elements of the player’s character are invisible to them, except for equipped articles/intro to player tools|tools.

Occlusion Mode

The DevCameraOcclusionMode property controls camera behavior when the player cannot see their character:

Setting Description

Zoom If the player’s character moves behind an object with BasePart/Transparency|Transparency lower than 0.25, the camera zooms in very close to the character so that he/she can be seen. Once the character moves back into a viewable position, the camera zooms back out.

Invisicam If the character moves behind an object (opaque or transparent), the camera remains in position but the object becomes semi-transparent so that the character can be seen. Once the character moves back into a viewable position, the object returns to its normal opacity.

Roblox官方链接:Customizing the Camera