Camera¶
Static Class
This object is a static class. It can be accessed by using it's name as a keyword like this Camera
.
Additionally, it cannot be created in the creator menu or with Instance.New()
This is only available to the client. It can only be accessed within local scripts.
Not newable
This object cannot be created by scripts using Instance.New()
Camera is a class that represents the local player's camera.
Inherits Instance
Properties¶
Distance : number
¶
The distance between the camera and the player when the camera is in FollowPlayer mode.
Example
Camera.Distance = 20
FOV : number
¶
Sets or return the camera's field of view.
Example
Camera.FOV = 90
FastFlySpeed : number
¶
The camera speed when the camera is in FreeCam mode while holding shift.
Example
Camera.FastFlySpeed = 100
FlySpeed : number
¶
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 : number
¶
The mouse sensitivity while in FreeCam mode.
Example
Camera.FreeLookSensitivity = 3
HorizontalSpeed : number
¶
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 : number
¶
The lerp speed of the camera when lerping is enabled.
Example
Camera.LerpSpeed = 15
MaxDistance : number
¶
The camera's maximum distance from the player in FollowPlayer mode.
Example
Camera.MaxDistance = 0
MinDistance : number
¶
The camera's minimum distance from the player in FollowPlayer mode.
Example
Camera.MinDistance = 5
Mode : CameraMode¶
Sets or returns the camera's current mode.
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 : number
¶
Determines the half-size of the camera when in orthographic mode.
Example
Camera.OrthographicSize = 30
Position : Vector3¶
The position of the camera in the world.
Example
Camera.Position = Vector3.New(0, 100, 0)
Rotation : Vector3¶
The rotation of the camera.
Example
Camera.Rotation = Vector3.New(90, 0, 0)
ScrollSensitivity : number
¶
Determines the scroll move speed of the camera.
Example
Camera.ScrollSensitivity = 15
VerticalSpeed : number
¶
Determines the vertical move speed of the camera.
Example
Camera.VerticalSpeed = 120