Lighting

extends Instance

Class fields

FieldXML typeValue
NamestringLighting
ExplorerOrderstring3
ExplorerImageIndexstring13
summarystringResponsible for all lighting aspects of the world (affects how things are rendered).

Properties

14
Ambient
Color3
FieldXML typeValue
NamestringAmbient
summarystringThe hue of the global lighting. Changing this changes the color tint of all objects in the Workspace.
Brightness
float
FieldXML typeValue
NamestringBrightness
summarystringHow much global light each Part in the Workspace receives. Standard range is 0 to 1 (0 being little light), but can be increased all the way to 5 (colors start to be appear very different at this value).
ClockTime
float
FieldXML typeValue
NamestringClockTime
ColorShift_Bottom
Color3
FieldXML typeValue
NamestringColorShift_Bottom
summarystringThe hue of global lighting on the bottom surfaces of an object.
ColorShift_Top
Color3
FieldXML typeValue
NamestringColorShift_Top
summarystringThe hue of global lighting on the top surfaces of an object.
FogColor
Color3
FieldXML typeValue
NamestringFogColor
summarystringA Color3 value that changes the hue of distance fog.
FogEnd
float
FieldXML typeValue
NamestringFogEnd
summarystringThe distance at which fog completely blocks your vision. This distance is relative to the camera position. Units are in studs
FogStart
float
FieldXML typeValue
NamestringFogStart
summarystringThe distance at which the fog gradient begins. This distance is relative to the camera position. Units are in studs.
GeographicLatitude
float
FieldXML typeValue
NamestringGeographicLatitude
summarystringThe latitude position the level is placed at. This affects sun position. <a href="http://wiki.roblox.com/index.php/GeographicLatitude" target="_blank">More info</a>
GlobalShadows
bool
FieldXML typeValue
NamestringGlobalShadows
summarystringFlag enabling shadows from sun and moon in the place
OutdoorAmbient
Color3
FieldXML typeValue
NamestringOutdoorAmbient
summarystringEffective ambient value for outdoors, effectively shadow color outdoors (requires GlobalShadows enabled)
Outlines
bool
FieldXML typeValue
NamestringOutlines
summarystringFlag enabling or disabling outlines on parts and terrain
ShadowColor
Color3
FieldXML typeValue
NamestringShadowColor
summarystringColor the shadows appear as. Shadows are drawn mostly for characters, but depending on the lighting will also show for Parts in the Workspace. Rendering settings can also affect if shadows are drawn.
TimeOfDay
string
FieldXML typeValue
NamestringTimeOfDay
summarystringA string that represent the current time of day. Time is in 24-hour clock format "XX::YY:ZZ", where X is hour, Y is minute, and Z is seconds.

Functions

7
GetMinutesAfterMidnight
() → double
FieldXML typeValue
NamestringGetMinutesAfterMidnight
summarystringThe number of minutes that the current time is past midnight. If currently at midnight, returns 0. Will return decimal values if not at an exact minute.
GetMoonDirection
() → Vector3
FieldXML typeValue
NamestringGetMoonDirection
summarystringReturns the lookVector (Vector3) of the moon. If this lookVector was used in a CFrame, the Part would face the moon.
GetMoonPhase
() → float
FieldXML typeValue
NamestringGetMoonPhase
summarystringCurrently always returns 0.75. MoonPhase cannot be edited.
GetSunDirection
() → Vector3
FieldXML typeValue
NamestringGetSunDirection
summarystringReturns the lookVector (Vector3) of the sun. If this lookVector was used in a CFrame, the Part would face the moon.
SetMinutesAfterMidnight
(minutes: double) → void
FieldXML typeValue
NamestringSetMinutesAfterMidnight
summarystringSets the time to be a certain number of minutes after midnight. This works with integer and decimal values.
getMinutesAfterMidnight
() → double
FieldXML typeValue
NamestringgetMinutesAfterMidnight
setMinutesAfterMidnight
(minutes: double) → void
FieldXML typeValue
NamestringsetMinutesAfterMidnight

Events

1
LightingChanged
(skyboxChanged: bool) → void
FieldXML typeValue
NamestringLightingChanged
summarystringFired whenever a property of Lighting is changed, or a skybox is added or removed. Skyboxes are of type 'Sky' and should be parented directly to lighting.