Lighting

Lighting : Instance

Overview

The Lighting system manages global lighting effects, enabling precise control over the game’s atmosphere through lightings

When used with Atmosphere, it enables realistic atmospheric effects such as fog and color adjustments.

Properties

AmbientSkyBrightness

number

Sets the ambient light brightness for both day and night.

Code Samples

local Lighting = game:GetService("Lighting")

Lighting.AmbientSkyBrightness = 7

AmbientSkyColor

Color3

Specifies the sky color for both day and night.

Code Samples

AutoTimeCycle

number

Enables automatic cycling of day and night phases.

When activated, time progresses naturally based on the Time Flow Speed. Note that time progression applies only during runtime.

Code Samples

ClockTime

number

Allows for day and night representation by setting the time. The direction and intensity of the global lighting are adjusted according to the time of day.

Code Samples

Contrast

number

Adjusts the contrast of the sky to enhance the depth of clouds, atmosphere, and colors, thereby increasing visual immersion.

Code Samples

GroundReflectionColor

Color3

Adjusts the color of light reflected from the ground.

Code Samples

MoonBrightness

number

Adjusts the brightness of the moonlight.

Code Samples

MoonCastShadow

bool

Determines whether the moonlight casts shadows.

Code Samples

MoonLightColor

Color3

Specifies the color of moonlight. Used to recreate the natural lighting of nighttime.

Code Samples

MoonMaterialColor

Color3

Sets the surface color of the moon and the color of surrounding clouds.

Code Samples

MoonMaxHeight

number

Sets the maximum elevation the moon can reach.

Code Samples

MoonPathAngle

number

Sets the angle of the moon's path. Used to simulate changes in the moon's orbit or position.

Code Samples

MoonPhase

number

Adjusts the moon's phase (full moon, half moon, crescent, etc.) to change its appearance.

Code Samples

NightBrightness

number

Sets the overall lighting brightness during nighttime. Used to create a dark atmosphere or simulate moonlight effects.

Code Samples

RealTimeDayDuration

number

The actual duration of the day/night cycle based on the current Time Flow Speed. (Read-only, e.g., 20 m / 00 s)

Code Samples

Saturation

number

Adjusts the saturation level of the global color. Lower values result in a duller look, while higher values produce more vivid and vibrant colors.

Code Samples

StarsBrightness

number

Sets the brightness of stars, determining how visible they appear in the night sky.

Code Samples

StarsColor

Color3

Specifies the color of starlight.

Code Samples

SunBrightness

number

Sets the brightness of the sunlight. Higher values produce stronger daylight effects.

Code Samples

SunCastShadow

number

Determines whether the sunlight casts shadows.

Code Samples

SunLightColor

Color3

Specifies the color of sunlight. Used to recreate the natural lighting of daytime.

Code Samples

SunMaxHeight

number

Sets the maximum elevation (height) the sun can reach.

Code Samples

SunPathAngle

number

Sets the angle of the sun's path. Used to simulate seasonal sun elevation or the direction of sunlight.

Code Samples

TimeFlowSpeed

number

Sets the speed at which the day/night cycle progresses. Higher values result in shorter time intervals between changes.

Code Samples

Code Samples

Methods

Events

See also

Lighting

Last updated