# Lighting

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/Lighting/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Lighting

The [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md) 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.

## Properties

### Ambient

```luau
Lighting.Ambient: Color3 = Color3.new(0.5, 0.5, 0.5)
```

- Tags: Read capabilities: Environment

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

### Brightness

```luau
Lighting.Brightness: number = 1
```

- Tags: Read capabilities: Environment

The intensity of illumination in the place.

### ColorShift_Bottom

```luau
Lighting.ColorShift_Bottom: Color3 = Color3.new(0, 0, 0)
```

- Tags: Read capabilities: Environment

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

### ColorShift_Top

```luau
Lighting.ColorShift_Top: Color3 = Color3.new(0, 0, 0)
```

- Tags: Read capabilities: Environment

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

### EnvironmentDiffuseScale

```luau
Lighting.EnvironmentDiffuseScale: number = 0
```

- Tags: Read capabilities: Environment

Ambient light that is derived from the environment.

### EnvironmentSpecularScale

```luau
Lighting.EnvironmentSpecularScale: number = 0
```

- Tags: Read capabilities: Environment

Specular light derived from environment.

### ExtendLightRangeTo120

```luau
Lighting.ExtendLightRangeTo120: Enum.RolloutState = Enum.RolloutState.Default
```

- Tags: Not scriptable, Read capabilities: Environment

Unused. Light `Range` is always clamped to 120 studs.

### GlobalShadows

```luau
Lighting.GlobalShadows: boolean = false
```

- Tags: Read capabilities: Environment

Toggles voxel-based dynamic lighting for the place.

### LightingStyle

```luau
Lighting.LightingStyle: Enum.LightingStyle = Enum.LightingStyle.Realistic
```

- Tags: Read capabilities: Environment, Write capabilities: PluginOrOpenCloud

The artistic intent behind lighting in the experience.

### OutdoorAmbient

```luau
Lighting.OutdoorAmbient: Color3 = Color3.new(0.5, 0.5, 0.5)
```

- Tags: Read capabilities: Environment

The lighting hue applied to outdoor areas.

### PrioritizeLightingQuality

```luau
Lighting.PrioritizeLightingQuality: boolean = true
```

- Tags: Read capabilities: Environment, Write capabilities: PluginOrOpenCloud

Indicates whether you prefer lighting/shading quality or view distance to scale down first.

### ShadowSoftness

```luau
Lighting.ShadowSoftness: number = 0.5
```

- Tags: Read capabilities: Environment

Controls how blurry the shadows are.

### Outlines

```luau
Lighting.Outlines: boolean = true
```

- Tags: Deprecated, Read capabilities: Environment

**Deprecated:** This item is no longer supported as the outlines feature was removed from the Roblox platform.

Determines whether outlines are enabled or disabled in a place.

### ShadowColor

```luau
Lighting.ShadowColor: Color3 = Color3.new(0.7, 0.7, 0.72)
```

- Tags: Deprecated, Not replicated, Read capabilities: Environment, Load only

**Deprecated:** This item is deprecated and has no current functionality. Do not use it for new work.

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

### Technology

```luau
Lighting.Technology: Enum.Technology = Enum.Technology.Compatibility
```

- Tags: Deprecated, Roblox script security, Read capabilities: Environment
- Use instead: [`Lighting.LightingStyle`](https://rapi.sleaze.dev/classes/Lighting.md)

Determines the lighting system for rendering the 3D world. Non-scriptable.

### ClockTime

```luau
Lighting.ClockTime: number = 14
```

- Tags: Not replicated, Read capabilities: Environment, Load only

A numerical representation (in hours) of the current time of day used by [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md).

### GeographicLatitude

```luau
Lighting.GeographicLatitude: number = 41.7332993
```

- Tags: Read capabilities: Environment

The geographic latitude, in degrees, of the scene, influencing the result of [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md) time on the position of the sun and moon.

### TimeOfDay

```luau
Lighting.TimeOfDay: string = "14:00:00"
```

- Tags: Read capabilities: Environment

A 24-hour string representation of the current time of day used by [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md).

### ExposureCompensation

```luau
Lighting.ExposureCompensation: number = 0
```

- Tags: Read capabilities: Environment

The exposure compensation value.

### FogColor

```luau
Lighting.FogColor: Color3 = Color3.new(0.75, 0.75, 0.75)
```

- Tags: Read capabilities: Environment

A [`Color3`](https://rapi.sleaze.dev/index/types/Color3.md) value giving the hue of [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md) fog.

### FogEnd

```luau
Lighting.FogEnd: number = 100000
```

- Tags: Read capabilities: Environment

The depth from the [`Workspace.CurrentCamera`](https://rapi.sleaze.dev/classes/Workspace.md), in studs, at which fog will be completely opaque.

### FogStart

```luau
Lighting.FogStart: number = 0
```

- Tags: Read capabilities: Environment

The depth from the [`Workspace.CurrentCamera`](https://rapi.sleaze.dev/classes/Workspace.md), in studs, at which fog begins to show.

## Methods

### GetMinutesAfterMidnight

```luau
Lighting:GetMinutesAfterMidnight(): number
```

- Tags: Thread safe, Capabilities: Environment

Returns the number of minutes that have passed after midnight for the purposes of lighting.

Returns: The number of minutes after midnight.

### GetMoonDirection

```luau
Lighting:GetMoonDirection(): Vector3
```

- Tags: Thread safe, Capabilities: Environment

Returns a [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the direction of the moon.

Returns: [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the direction of the moon.

### GetMoonPhase

```luau
Lighting:GetMoonPhase(): number
```

- Tags: Capabilities: Environment

Returns the moon's current phase.

### GetSunDirection

```luau
Lighting:GetSunDirection(): Vector3
```

- Tags: Thread safe, Capabilities: Environment

Returns a [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the direction of the sun.

Returns: [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the direction of the sun.

### SetMinutesAfterMidnight

```luau
Lighting:SetMinutesAfterMidnight(minutes: number)
```

- Tags: Capabilities: Environment

Sets [`TimeOfDay`](https://rapi.sleaze.dev/classes/Lighting.md) and [`ClockTime`](https://rapi.sleaze.dev/classes/Lighting.md) to the given number of minutes after midnight.

Parameters:

- `minutes`: The number of minutes after midnight.

### getMinutesAfterMidnight

```luau
Lighting:getMinutesAfterMidnight(): number
```

- Tags: Deprecated, Capabilities: Environment
- Use instead: [`Lighting.GetMinutesAfterMidnight`](https://rapi.sleaze.dev/classes/Lighting.md)

**Deprecated:** This method is a deprecated variant of [`Lighting:GetMinutesAfterMidnight()`](https://rapi.sleaze.dev/classes/Lighting.md) which should be used instead.

### setMinutesAfterMidnight

```luau
Lighting:setMinutesAfterMidnight(minutes: number)
```

- Tags: Deprecated, Capabilities: Environment
- Use instead: [`Lighting.SetMinutesAfterMidnight`](https://rapi.sleaze.dev/classes/Lighting.md)

**Deprecated:** This method is a deprecated variant of [`Lighting:SetMinutesAfterMidnight()`](https://rapi.sleaze.dev/classes/Lighting.md) which should be used instead.

## Events

### LightingChanged

```luau
Lighting.LightingChanged: RBXScriptSignal<(skyChanged: boolean)>
```

- Tags: Capabilities: Environment

This event fires when a [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md) property is changed or a [`Sky`](https://rapi.sleaze.dev/classes/Sky.md) is added or removed from [`Lighting`](https://rapi.sleaze.dev/classes/Lighting.md).

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
