# 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

### Ambient

`Color3`

Sets the ambient light color for the entire scene. Affects the base brightness in dark areas and shadows.

#### Code Samples

### AmbientSkyBrightness

`number`

Sets the ambient light brightness for both day and night.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.AmbientSkyBrightness = 7
```

### AmbientSkyColor

`Color3`

Specifies the sky color for both day and night.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.AmbientSkyColor = Color3.fromRGB(255, 0, 0)
```

### AutoTimeCycle

`boolean`

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

```lua
local Lighting = game:GetService("Lighting")

Lighting.AutoTimeCycle = true
```

### Brightness

`number`

Sets the brightness of the global lighting. Higher values make the entire scene brighter.

#### 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

```lua
local Lighting = game:GetService("Lighting")

Lighting.ClockTime = 20
```

### Contrast

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.Contrast = 1.6
```

### GroundReflectionColor

`Color3`

Adjusts the color of light reflected from the ground.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.GroundReflectionColor = Color3.fromRGB(255, 0, 0)
```

### MoonBrightness

`number`

Adjusts the brightness of the moonlight.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonBrightness = 0.5
```

### MoonCastShadow

`boolean`

Determines whether the moonlight casts shadows.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonCastShadow = false
```

### MoonLightColor

`Color3`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonLightColor = Color3.fromRGB(255, 0, 0)
```

### MoonMaterialColor

`Color3`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonMaterialColor = Color3.fromRGB(255, 0, 0)
```

### MoonMaxHeight

`number`

Sets the maximum elevation the moon can reach.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonMaxHeight = -60
```

### MoonPathAngle

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonPathAngle = 120
```

### MoonPhase

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.MoonPhase = 7.5
```

### NightBrightness

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.NightBrightness = 1.6
```

### RealTimeDayDuration

`string`

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

```lua
local Lighting = game:GetService("Lighting")

Lighting.Saturation = 0.2
```

### ShadowDetailLevel

`Enum.ShadowDetailLevel`

Sets the overall detail level of shadows rendered in the scene. Higher values can produce more detailed shadows, but may increase performance cost depending on the environment.

#### Code Samples

### SkyColorInfluence

`number`

Controls how much the fog reflects the sky color.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Atmosphere.SkyColorInfluence = 0.8
```

### StarsBrightness

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.StarsBrightness = 2
```

### StarsColor

`Color3`

Specifies the color of starlight.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.StarsColor = Color3.fromRGB(255, 0, 0)
```

### SunBrightness

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.SunBrightness = 10
```

### SunCastShadow

`boolean`

Determines whether the sunlight casts shadows.

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.SunCastShadow = false
```

### SunLightColor

`Color3`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.SunLightColor = Color3.fromRGB(255, 0, 0)
```

### SunMaxHeight

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.SunMaxHeight = 100
```

### SunPathAngle

`number`

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

#### Code Samples

```lua
local Lighting = game:GetService("Lighting")

Lighting.SunPathAngle = 120
```

### TimeFlowSpeed

`number`

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

#### Code Samples

## Methods

## Events

## See also

{% content-ref url="/pages/3KvY0jqe4oODQNMi9cxP" %}
[Lighting](/manual/studio-manual/object/lighting.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/classes/lighting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
