Skip to content

Sun

Class ยท server and client scripts

Sun controls the direction, tint, and intensity of the world's directional sunlight. Access it through World.Sun.

Example

-- Server script.
World.Sun.Elevation = 35
World.Sun.Azimuth = 120
World.Sun.Tint = Color.new(1, 0.95, 0.85)
World.Sun.Intensity = 1.4

Azimuth

Property
Azimuth: number

Azimuth is the compass angle of the sun around the horizon, in degrees.

Default 0

Elevation

Property
Elevation: number

Elevation is the angle of the sun above the horizon, in degrees. Negative values place the sun below the horizon.

Default 45

Tint

Property
Tint: Color

Tint is the color tint of the sunlight.

Default Color.White

Intensity

Property
Intensity: number

Intensity is the brightness of the sunlight, from 0 to 20. At 0 surfaces receive only ambient light.

Default 1