Skip to content

Camera

Static Class

This object is a static class. It can be accessed by using its name as a keyword like this: Camera.

Additionally, it cannot be created in the creator menu or with Instance.New().

Not newable

This object cannot be created by scripts using Instance.New().

This is only available to the client. It can only be accessed within local scripts.

Camera is a class that represents the local player's camera.

Inherits Instance

Properties

Distance : float

Determines the distance between the camera and the player when the camera is in FollowPlayer mode.

Example

Camera.Distance = 20

FOV : float

Determines or returns the camera's field of view.

Example

Camera.FOV = 90

FastFlySpeed : float

Determines the camera speed when the camera is in FreeCam mode while holding shift.

Example

Camera.FastFlySpeed = 100

FlySpeed : float

Determines the camera speed when the camera is in FreeCam mode.

Example

Camera.FlySpeed = 10

FollowLerp : boolean

Determines whether or not to use lerping in FollowPlayer mode.

Example

Camera.FollowLerp = true

FreeLookSensitivity : float

Determines the mouse sensitivity while in FreeCam mode.

Example

Camera.FreeLookSensitivity = 3

HorizontalSpeed : float

Determines the horizontal movement speed of the camera in FollowPlayer mode.

Example

Camera.HorizontalSpeed = 120

IsFirstPerson : boolean

Returns whether or not the camera is in first person.

Example

print(Camera.IsFirstPerson)

This property is read-only and cannot be modified.

LerpSpeed : float

Determines the lerp speed of the camera when lerping is enabled.

Example

Camera.LerpSpeed = 15

MaxDistance : float

Determines camera's maximum distance from the player in FollowPlayer mode.

Example

Camera.MaxDistance = 0

MinDistance : float

The camera's minimum distance from the player in FollowPlayer mode.

Example

Camera.MinDistance = 5

Mode : CameraMode

Determines or returns the camera's current mode (Scripted, FollowPlayer, Freecam).

Example

Camera.Mode = CameraMode.Scripted

Orthographic : boolean

Determines whether or not the camera should render in orthographic (2D) mode or not (3D).

Example

Camera.Orthographic = true

OrthographicSize : float

Determines the half-size of the camera when in orthographic mode.

Example

Camera.OrthographicSize = 30

Position : Vector3

Determines or returns position of the camera in the world.

Example

Camera.Position = Vector3.New(0, 100, 0)

PositionOffset : Vector3

Determines the camera's offset from its position.

Example

-- Offsets the camera to be slightly above the player
Camera.PositionOffset = Vector3.New(0, 5, 0)

Rotation : Vector3

Determines or returns rotation of the camera.

Example

Camera.Rotation = Vector3.New(90, 0, 0)

RotationOffset : Vector3

Determines the camera's offset from its rotation.

Example

-- Offsets the camera to be slightly rotated
Camera.RotationOffset = Vector3.New(0, 5, 0)

ScrollSensitivity : float

Determines the scroll move speed of the camera.

Example

Camera.ScrollSensitivity = 15

VerticalSpeed : float

Determines the vertical move speed of the camera.

Example

Camera.VerticalSpeed = 120