Responsible for all lighting aspects of the world (affects how things are rendered). This class cannot be instantiated.
The hue of the global lighting. Changing this changes the color tint of all objects in the Workspace.
How 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).
A float version of the TimeOfDay property.
local lighting = game:GetService("Lighting") lighting.ClockTime = 4repeat lighting.ClockTime = lighting.ClockTime + 1 wait(1) until lighting.ClockTime == 0print("It's midnight!")
The hue of global lighting on the bottom surfaces of an object.
The hue of global lighting on the top surfaces of an object.
A Color3 value that changes the hue of distance fog.
The distance at which fog completely blocks your vision. This distance is relative to the camera position. Units are in studs
The distance at which the fog gradient begins. This distance is relative to the camera position. Units are in studs.
The latitude position the level is placed at. This affects sun position.
Flag enabling shadows from sun and moon in the place
Effective ambient value for outdoors, effectively shadow color outdoors (requires GlobalShadows enabled)
Flag enabling or disabling outlines on parts and terrain
Color3 ShadowColor [deprecated]
Color 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.
A string that represent the current time of day. Time is in 24-hour clock format "hh:mm:ss".
The 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.
Returns the lookVector (Vector3) of the moon. If this lookVector was used in a CFrame, the Part would face the moon.
Currently always returns 0.75. MoonPhase cannot be edited.
Returns the lookVector (Vector3) of the sun. If this lookVector was used in a CFrame, the Part would face the sun.
Sets the time to be a certain number of minutes after midnight. This works with integer and decimal values.
RBXScriptSignal LightingChanged(bool skyboxChanged)
Fired 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.