Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
Lighting
Inherits from: Instance → Object
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.
Inherits from: Instance
Memory category: Instances
Tags: NotCreatable, Service
Properties
| Name | Type / Returns | Description |
|---|---|---|
| Lighting.Ambient | Color3 | The lighting hue applied to areas that are occluded from the sky, such as indoor areas. |
| Lighting.Brightness | float | The intensity of illumination in the place. |
| Lighting.ClockTime | float | A numerical representation (in hours) of the current time of day used by Lighting. |
| Lighting.ColorShift_Bottom | Color3 | The hue represented in light reflected in the opposite surfaces to those facing the sun or moon. |
| Lighting.ColorShift_Top | Color3 | The hue represented in light reflected from surfaces facing the sun or moon. |
| Lighting.EnvironmentDiffuseScale | float | Ambient light that is derived from the environment. |
| Lighting.EnvironmentSpecularScale | float | Specular light derived from environment. |
| Lighting.ExposureCompensation | float | The exposure compensation value. |
| Lighting.ExtendLightRangeTo120 | RolloutState | Unused. Light Range is always clamped to 120 studs. |
| Lighting.FogColor | Color3 | A Color3 value giving the hue of Lighting fog. |
| Lighting.FogEnd | float | The depth from the Workspace.CurrentCamera, in studs, at which fog will be completely opaque. |
| Lighting.FogStart | float | The depth from the Workspace.CurrentCamera, in studs, at which fog begins to show. |
| Lighting.GeographicLatitude | float | The geographic latitude, in degrees, of the scene, influencing the result of Lighting time on the position of the sun and moon. |
| Lighting.GlobalShadows | boolean | Toggles voxel-based dynamic lighting for the place. |
| Lighting.LightingStyle | LightingStyle | The artistic intent behind lighting in the experience. |
| Lighting.OutdoorAmbient | Color3 | The lighting hue applied to outdoor areas. |
| Lighting.Outlines | boolean | Determines whether outlines are enabled or disabled in a place. |
| Lighting.PrioritizeLightingQuality | boolean | Indicates whether you prefer lighting/shading quality or view distance to scale down first. |
| Lighting.ShadowColor | Color3 | This is supposed to change the color of player shadows, but currently doesn't do anything. |
| Lighting.ShadowSoftness | float | Controls how blurry the shadows are. |
| Lighting.Technology | Technology | Determines the lighting system for rendering the 3D world. Non-scriptable. |
| Lighting.TimeOfDay | string | A 24-hour string representation of the current time of day used by Lighting. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
Lighting.Ambient
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.
| Field | Value |
|---|---|
| type | Color3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.Brightness
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).
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.ClockTime
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.
| Field | Value |
|---|---|
| type | float |
| tags | ["NotReplicated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":false} |
| capabilities | ["Environment"] |
Lighting.ColorShift_Bottom
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).
| Field | Value |
|---|---|
| type | Color3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.ColorShift_Top
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] .
| Field | Value |
|---|---|
| type | Color3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.EnvironmentDiffuseScale
Ambient light that is derived from the environment with a default of 0. This property is similar to Ambient and OutdoorAmbient but it's dynamic and can change according to the sky and time of day. When this property is increased, it's recommended to decrease Ambient and OutdoorAmbient accordingly.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.EnvironmentSpecularScale
Specular light derived from environment with a default of 0. This property will make smooth objects reflect the environment and it is especially important to make metal look more realistic.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.ExposureCompensation
This property determines the exposure compensation amount which applies a bias to the exposure level of the scene prior to the tonemap step. Defaults to 0 (no exposure compensation) and has a range from -5 to 5. A value of 1 indicates twice as much exposure and -1 means half as much exposure.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Exposure |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.ExtendLightRangeTo120
Unused. The maximum Range of PointLight, SpotLight, and SurfaceLight objects is always 120 studs; this property does not change that clamp.
This property is typed as RolloutState. It is non-scriptable and hidden in the Studio Properties window.
| Field | Value |
|---|---|
| type | RolloutState |
| tags | ["NotScriptable"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.FogColor
A Color3 value giving the hue of Lighting fog. Note that fog properties are hidden when Lighting contains an Atmosphere object.
| Field | Value |
|---|---|
| type | Color3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Fog |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.FogEnd
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.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Fog |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.FogStart
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.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Fog |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.GeographicLatitude
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().
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.GlobalShadows
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.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.LightingStyle
LightingStyle indicates the artistic intent behind lighting in the experience, as an LightingStyle option. LightingStyle.Soft is the stylized look; LightingStyle.Realistic is the naturalistic look. The actual shadowing path also depends on PrioritizeLightingQuality (for example, Soft with that property enabled uses shadow maps rather than voxel lighting).
| Field | Value |
|---|---|
| type | LightingStyle |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.OutdoorAmbient
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.
| Field | Value |
|---|---|
| type | Color3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.Outlines
Deprecated. This item is no longer supported as the outlines feature was removed from the Roblox platform.
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.
| Field | Value |
|---|---|
| type | boolean |
| tags | ["Deprecated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.PrioritizeLightingQuality
This property indicates whether you prefer lighting/shading quality or view distance to scale down first. As the rendering quality level reduces, a setting of true prioritizes features such as advanced shadows and high‑quality shaders at closer distances, while a setting of false prioritizes view distance.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.ShadowColor
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.
| Field | Value |
|---|---|
| type | Color3 |
| tags | ["NotReplicated","Deprecated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":false} |
| capabilities | ["Environment"] |
Lighting.ShadowSoftness
Controls how blurry the shadows are with a default of 0.2. This property only works when Technology mode is ShadowMap or Future and the device is capable of rendering shadow maps.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.Technology
Deprecated. This property has been superseded by LightingStyle which determines the artistic intent behind lighting, and PrioritizeLightingQuality which indicates whether you prefer lighting/shading quality or view distance to scale down first.
Determines the lighting system for rendering the 3D world. This property is non‑scriptable and only modifiable in Studio.
| Field | Value |
|---|---|
| type | Technology |
| security | {"read":"RobloxScriptSecurity","write":"RobloxScriptSecurity"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Lighting.TimeOfDay
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.
| Field | Value |
|---|---|
| type | string |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Environment"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| Lighting:GetMinutesAfterMidnight | double | Returns the number of minutes that have passed after midnight for the purposes of lighting. |
| Lighting:getMinutesAfterMidnight | double | |
| Lighting:GetMoonDirection | Vector3 | Returns a Vector3 representing the direction of the moon. |
| Lighting:GetMoonPhase | float | Returns the moon's current phase. |
| Lighting:GetSunDirection | Vector3 | Returns a Vector3 representing the direction of the sun. |
| Lighting:SetMinutesAfterMidnight | () | Sets TimeOfDay and ClockTime to the given number of minutes after midnight. |
| Lighting:setMinutesAfterMidnight | () |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
Lighting:GetMinutesAfterMidnight
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.
Returns
| Type | Description |
|---|---|
| double | The number of minutes after midnight. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Safe |
| capabilities | ["Environment"] |
Lighting:getMinutesAfterMidnight
Deprecated. This method is a deprecated variant of Lighting:GetMinutesAfterMidnight() which should be used instead.
Returns
| Type | Description |
|---|---|
| double |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Environment"] |
Lighting:GetMoonDirection
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.
Returns
| Type | Description |
|---|---|
| Vector3 | Vector3 representing the direction of the moon. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Safe |
| capabilities | ["Environment"] |
Lighting:GetMoonPhase
Deprecated. There is currently no way to change the moon's phase, and thus this method should not be used.
Returns the moon's current phase. There is no way to change the moon's phase so this will always return 0.75.
Returns
| Type | Description |
|---|---|
| float |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Environment"] |
Lighting:GetSunDirection
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.
Returns
| Type | Description |
|---|---|
| Vector3 | Vector3 representing the direction of the sun. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Safe |
| capabilities | ["Environment"] |
Lighting:SetMinutesAfterMidnight
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.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| minutes | double | The number of minutes after midnight. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Environment"] |
Code samples: View on Creator Hub (Lighting-SetMinutesAfterMidnight).
Lighting:setMinutesAfterMidnight
Deprecated. This method is a deprecated variant of Lighting:SetMinutesAfterMidnight() which should be used instead.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| minutes | double |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Environment"] |
Events
| Name | Type / Returns | Description |
|---|---|---|
| Lighting.LightingChanged | This event fires when a Lighting property is changed or a Sky is added or removed from Lighting. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |
Lighting.LightingChanged
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:
- Changing
GlobalShadowswill not fire this event. - Changing fog properties
FogColor,FogStart, orFogEndwill not fire this event.
In cases where this behavior is not desired, the Object.Changed event or Object:GetPropertyChangedSignal() method can be used.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| skyChanged | boolean | true when a Sky is added or removed, or when a Sky property other than Sky.SkyboxOrientation changes. false for Lighting property changes, Atmosphere property changes, and SkyboxOrientation changes. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["Environment"] |