Skip to content

Lighting

Supported Class Services NotCreatable Service

The Lighting service controls global lighting in an experience. It includes a range of adjustable properties that you can use to change how lighting appears and interacts with other objects.

22 Nova members · 7 modern Roblox members not implemented yet

Description

The Lighting service controls global lighting in an experience. It includes a range of adjustable properties that you can use to change how lighting appears and interacts with other objects, as summarized in Lighting Properties.

Lighting may also contain an Atmosphere object to render realistic atmospheric effects, including particle density, haze, glare, and color. See Atmospheric Effects for details.

In addition, Lighting (along with Workspace.CurrentCamera) may contain post‑processing effects such as SunRaysEffect and BlurEffect.

Inheritance

Object → Instance → Lighting

Nova inheritance: Instance → Lighting

Properties

Ambient Supported Property The lighting hue applied to areas that are occluded from the sky, such as indoor areas.
Ambient: Color3

Ambient is the lighting hue applied to areas that are occluded from the sky, such as indoor areas.

Ambient defaults to [0, 0, 0] (black). As long as the red, green, and blue channels of this property do not exceed the corresponding channels in OutdoorAmbient, the change in hue will be reserved for areas occluded from the sun/moon.

Note that when GlobalShadows is disabled, there is no distinction between areas occluded from the sky and non‑occluded areas. In this case, OutdoorAmbient will be ignored and the hue from the Ambient property will be applied everywhere.

Roblox documentation

Brightness Supported Property The intensity of illumination in the place.
Brightness: float

The intensity of illumination in the place.

Changing this value will influence the impact of the light source (sun or moon) on the place's lighting. Note that Ambient and OutdoorAmbient can also be used to influence how bright a place appears. For example, setting OutdoorAmbient to [255, 255, 255] will make the place appear brighter than its default value of 127, 127, 127 (as it is more white).

Roblox documentation

ClockTime Supported Property A numerical representation (in hours) of the current time of day used by Lighting.
ClockTime: float

A numerical representation (in hours) of the current time of day used by Lighting. Note that this property does not correspond with the actual time of day and will not change during gameplay unless it has been changed by a script.

For a measure of Lighting time formatted as a 24-hour string, use TimeOfDay. Changing TimeOfDay or using SetMinutesAfterMidnight() will also change this property.

Roblox documentation

ColorShift_Bottom Supported Property The hue represented in light reflected in the opposite surfaces to those facing the sun or moon.
ColorShift_Bottom: Color3

The hue represented in light reflected in the opposite surfaces to those facing the sun or moon.

The surfaces of a BasePart influenced by ColorShift_Bottom depends on the position and orientation of the BasePart relative to the sun or moon's position. Where the sun is directly overhead a BasePart, the shift in color will only apply to the bottom surface.

This effect can be increased or reduced by altering Brightness.

Note that ColorShift_Top and ColorShift_Bottom will interact with the Ambient and OutdoorAmbient properties if they are greater than [0, 0, 0]. Also note that the influence of ColorShift_Bottom can be very hard to identify when GlobalShadows is enabled (default).

Roblox documentation

ColorShift_Top Supported Property The hue represented in light reflected from surfaces facing the sun or moon.
ColorShift_Top: Color3

The hue represented in light reflected from surfaces facing the sun or moon.

The surfaces of a BasePart influenced by ColorShift_Top depends on the position and orientation of the BasePart relative to the sun or moon's position. Where the sun is directly overhead a BasePart, the shift in color will only apply to the top surface.

This effect can be increased or reduced by altering Brightness.

Note that ColorShift_Top and ColorShift_Bottom will interact with the Ambient and OutdoorAmbient properties if they are greater than [0, 0, 0].

Roblox documentation

FogColor Supported Property A Color3 value giving the hue of Lighting fog.
FogColor: Color3

A Color3 value giving the hue of Lighting fog. Note that fog properties are hidden when Lighting contains an Atmosphere object.

Roblox documentation

FogEnd Supported Property The depth from the Workspace.CurrentCamera, in studs, at which fog will be completely opaque.
FogEnd: float

The depth from the Workspace.CurrentCamera, in studs, at which fog will be completely opaque. Note that fog properties are hidden when Lighting contains an Atmosphere object.

Roblox documentation

FogStart Supported Property The depth from the Workspace.CurrentCamera, in studs, at which fog begins to show.
FogStart: float

The depth from the Workspace.CurrentCamera, in studs, at which fog begins to show. Note that fog properties are hidden when Lighting contains an Atmosphere object.

Roblox documentation

GeographicLatitude Supported Property The geographic latitude, in degrees, of the scene, influencing the result of Lighting time on the position of the sun and moon.
GeographicLatitude: float

The geographic latitude, in degrees, of the scene, influencing the result of Lighting time on the position of the sun and moon. When calculating the position of the sun, the earth's tilt is also taken into account.

Changing GeographicLatitude will alter the position of the sun at every TimeOfDay. If you're looking to obtain the sun or moon's position, use GetSunDirection() or GetMoonDirection().

Roblox documentation

GlobalShadows Supported Property Toggles voxel-based dynamic lighting for the place.
GlobalShadows: bool

Toggles voxel-based dynamic lighting for the place.

Toggles voxel-based dynamic lighting in the place. When set to true, shadows are rendered in sheltered areas depending on the position of the sun and moon. The lighting hue applied to these sheltered areas is determined by the Ambient property while the lighting hue in all other areas is determined by the OutdoorAmbient property.

When false, shadows are not drawn and no distinction is made between indoor and outdoor areas. As a result, the Ambient property determines the lighting hue and OutdoorAmbient will do nothing.

Shadows are calculated using a voxel system and each lighting voxel is 4×4×4 studs. This means objects need to be larger than 4×4×4 studs to display a realistic shadow. Shadows are also recalculated when BaseParts are moving.

Roblox documentation

OutdoorAmbient Supported Property The lighting hue applied to outdoor areas.
OutdoorAmbient: Color3

OutdoorAmbient is the lighting hue applied to outdoor areas.

OutdoorAmbient defaults to [127, 127, 127]. As long as the red, green, and blue channels of Ambient do not exceed the corresponding channels in OutdoorAmbient, the hue of the lighting in outdoor areas will be determined by this property.

The effective OutdoorAmbient value is clamped to be greater than or equal to Ambient in all channels, meaning that if a channel of Ambient exceeds its corresponding OutdoorAmbient channel, the hue of Ambient will begin to apply to outdoor areas.

Note that when GlobalShadows is disabled, there is no distinction between areas occluded from the sky and non‑occluded areas. In this case, OutdoorAmbient will be ignored and the hue from the Ambient property will be applied everywhere.

Roblox documentation

Outlines Supported Property Deprecated Determines whether outlines are enabled or disabled in a place.
Outlines: bool

This property determines whether outlines are enabled or disabled in a place.

Outlines can be disabled on a global basis, using this Lighting property, or alternatively on a surface-by-surface basis for BaseParts using SurfaceType.

Although this property can be set by scripts, it recommended this property is set in Roblox Studio prior to publishing the place.

Roblox documentation

ShadowColor Supported Property Deprecated This is supposed to change the color of player shadows, but currently doesn't do anything.
ShadowColor: Color3

This is supposed to change the color of player shadows, but currently doesn't do anything.

Roblox documentation

TimeOfDay Supported Property A 24-hour string representation of the current time of day used by Lighting.
TimeOfDay: string

A 24-hour string representation of the current time of day used by Lighting. For example:

local Lighting = game:GetService("Lighting")

Lighting.TimeOfDay = "11:00" -- Set time of day to 11:00 AM
Lighting.TimeOfDay = "21:30" -- Set time of day to 9:30 PM

Note that this property does not correspond with the real-world time of day and will not change during gameplay unless it has been changed by a script.

For a numeric measure of Lighting time, use ClockTime. Changing ClockTime or using SetMinutesAfterMidnight() will also change this property.

Roblox documentation

Methods

GetMinutesAfterMidnight Supported Function Returns the number of minutes that have passed after midnight for the purposes of lighting.
Lighting:GetMinutesAfterMidnight(): double

Returns the number of minutes that have passed after midnight for the purposes of lighting. This number will be nearly identical to ClockTime multiplied by 60.

Note that this number will not always be equal to the value given in SetMinutesAfterMidnight() as it returns minutes after midnight in the current day.

Roblox documentation

getMinutesAfterMidnight Supported Function Deprecated
Lighting:getMinutesAfterMidnight(): double

No description available.

Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

GetMoonDirection Supported Function Returns a Vector3 representing the direction of the moon.
Lighting:GetMoonDirection(): Vector3

Returns a Vector3 representing the direction of the moon from the position (0, 0, 0). Note that when the moon has "set" and is no longer visible, the Vector3 returned by this method will continue to point towards the moon below the horizon.

GetSunDirection() is a variant of this method for obtaining the direction of the sun.

Roblox documentation

GetMoonPhase Supported Function Deprecated Returns the moon's current phase.
Lighting:GetMoonPhase(): float

Returns the moon's current phase. There is no way to change the moon's phase so this will always return 0.75.

Roblox documentation

GetSunDirection Supported Function Returns a Vector3 representing the direction of the sun.
Lighting:GetSunDirection(): Vector3

Returns a Vector3 representing the direction of the sun from the position (0, 0, 0). Note that when the sun has "set" and is no longer visible, the Vector3 returned by this method will continue to point towards the sun below the horizon.

GetMoonDirection() is a variant of this method for obtaining the direction of the moon.

Roblox documentation

SetMinutesAfterMidnight Supported Function Sets TimeOfDay and ClockTime to the given number of minutes after midnight.
Lighting:SetMinutesAfterMidnight(double minutes)

Sets TimeOfDay and ClockTime to the given number of minutes after midnight.

This method allows a numerical value to be used, for example in a day/night cycle Script, without the need to convert to a string in the format required by TimeOfDay. It also allows values greater than 24 hours to be given that correspond to times in the next day.

The following code sample includes a simple day/night cycle script. The speed of time and the initial time can be changed using the TIME_SPEED and START_TIME parameters.

Roblox reference signature
Lighting:SetMinutesAfterMidnight(minutes: double): null

Roblox documentation

setMinutesAfterMidnight Supported Function Deprecated
Lighting:setMinutesAfterMidnight(double minutes)

No description available.

Roblox reference signature
Lighting:setMinutesAfterMidnight(minutes: double): null
Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

Events

LightingChanged Supported Event This event fires when a Lighting property is changed or a Sky is added or removed from Lighting.
LightingChanged(bool skyboxChanged)

This event fires when a Lighting property is changed or a Sky is added or removed from Lighting. See the skyChanged parameter for when that flag is true versus false. Some Lighting property changes never fire this event:

In cases where this behavior is not desired, the Object.Changed event or Object.GetPropertyChangedSignal() method can be used.

Roblox reference signature
LightingChanged(skyChanged: bool)

Roblox documentation

Inherited members

Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.

7 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's Lighting class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Properties

Member Signature Status Notes Flags
EnvironmentDiffuseScale EnvironmentDiffuseScale: float Not yet Ambient light that is derived from the environment. —
EnvironmentSpecularScale EnvironmentSpecularScale: float Not yet Specular light derived from environment. —
ExposureCompensation ExposureCompensation: float Not yet The exposure compensation value. —
LightingStyle LightingStyle: LightingStyle Not yet The artistic intent behind lighting in the experience. —
PrioritizeLightingQuality PrioritizeLightingQuality: bool Not yet Indicates whether you prefer lighting/shading quality or view distance to scale down first. —
ShadowSoftness ShadowSoftness: float Not yet Controls how blurry the shadows are. —
Technology Technology: Technology Not yet Determines the lighting system for rendering the 3D world. Non-scriptable. RobloxScriptSecurity

Roblox reference: Lighting

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.