Skip to content
Roblox API Reference

Lighting

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.
  • Not creatable
  • Service
Memory category
Instances
Own members
30
Inherited members
75
Subclasses
0
Siblings
608

Properties45

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byLighting22

Property categoryAppearance

  • Lighting.Ambient: Color3 = Color3.new(0.5, 0.5, 0.5)
    The lighting hue applied to areas that are occluded from the sky, such as indoor areas.
    • Read capabilities: Environment
  • Lighting.Brightness: number = 1
    The intensity of illumination in the place.
    • Read capabilities: Environment
  • Lighting.ColorShift_Bottom: Color3 = Color3.new(0, 0, 0)
    The hue represented in light reflected in the opposite surfaces to those facing the sun or moon.
    • Read capabilities: Environment
  • Lighting.ColorShift_Top: Color3 = Color3.new(0, 0, 0)
    The hue represented in light reflected from surfaces facing the sun or moon.
    • Read capabilities: Environment
  • Lighting.EnvironmentDiffuseScale: number = 0
    Ambient light that is derived from the environment.
    • Read capabilities: Environment
  • Lighting.EnvironmentSpecularScale: number = 0
    Specular light derived from environment.
    • Read capabilities: Environment
  • Lighting.ExtendLightRangeTo120: Enum.RolloutState = Enum.RolloutState.Default
    Unused. Light Range is always clamped to 120 studs.
    • Not scriptable
    • Read capabilities: Environment
  • Lighting.GlobalShadows: boolean = false
    Toggles voxel-based dynamic lighting for the place.
    • Read capabilities: Environment
  • The artistic intent behind lighting in the experience.
    • Read capabilities: Environment
    • Write capabilities: PluginOrOpenCloud
  • Lighting.OutdoorAmbient: Color3 = Color3.new(0.5, 0.5, 0.5)
    The lighting hue applied to outdoor areas.
    • Read capabilities: Environment
  • Lighting.PrioritizeLightingQuality: boolean = true
    Indicates whether you prefer lighting/shading quality or view distance to scale down first.
    • Read capabilities: Environment
    • Write capabilities: PluginOrOpenCloud
  • Lighting.ShadowSoftness: number = 0.5
    Controls how blurry the shadows are.
    • Read capabilities: Environment
  • Lighting.Outlines: boolean = true
    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.
    • Deprecated
    • Read capabilities: Environment
  • Lighting.ShadowColor: Color3 = Color3.new(0.7, 0.7, 0.72)
    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.
    • Deprecated
    • Not replicated
    • Read capabilities: Environment
    • Load only
  • Determines the lighting system for rendering the 3D world. Non-scriptable.
    • Deprecated
    • Roblox script security
    • Read capabilities: Environment

    Use LightingStyle instead.

Property categoryData

  • Lighting.ClockTime: number = 14
    A numerical representation (in hours) of the current time of day used by Lighting.
    • Not replicated
    • Read capabilities: Environment
    • Load only
  • Lighting.GeographicLatitude: number = 41.7332993
    The geographic latitude, in degrees, of the scene, influencing the result of Lighting time on the position of the sun and moon.
    • Read capabilities: Environment
  • Lighting.TimeOfDay: string = "14:00:00"
    A 24-hour string representation of the current time of day used by Lighting.
    • Read capabilities: Environment

Property categoryExposure

  • Lighting.ExposureCompensation: number = 0
    The exposure compensation value.
    • Read capabilities: Environment

Property categoryFog

  • Lighting.FogColor: Color3 = Color3.new(0.75, 0.75, 0.75)
    A Color3 value giving the hue of Lighting fog.
    • Read capabilities: Environment
  • Lighting.FogEnd: number = 100000
    The depth from the Workspace.CurrentCamera, in studs, at which fog will be completely opaque.
    • Read capabilities: Environment
  • Lighting.FogStart: number = 0
    The depth from the Workspace.CurrentCamera, in studs, at which fog begins to show.
    • Read capabilities: Environment

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byLighting7
  • Lighting:GetMinutesAfterMidnight(): number
    Returns the number of minutes that have passed after midnight for the purposes of lighting.
    • Thread safe
    • Capabilities: Environment
    Returns
    TypeDescription
    number
    The number of minutes after midnight.
  • Lighting:GetMoonDirection(): Vector3
    Returns a Vector3 representing the direction of the moon.
    • Thread safe
    • Capabilities: Environment
    Returns
    TypeDescription
    Vector3
    Vector3 representing the direction of the moon.
  • Lighting:GetMoonPhase(): number
    Returns the moon's current phase.
    • Capabilities: Environment
    Returns
    Type
    number
  • Lighting:GetSunDirection(): Vector3
    Returns a Vector3 representing the direction of the sun.
    • Thread safe
    • Capabilities: Environment
    Returns
    TypeDescription
    Vector3
    Vector3 representing the direction of the sun.
  • Lighting:SetMinutesAfterMidnight(minutes: number)
    Sets TimeOfDay and ClockTime to the given number of minutes after midnight.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    minutes: number
    The number of minutes after midnight.
  • Lighting:getMinutesAfterMidnight(): number
    Deprecated: This method is a deprecated variant of Lighting:GetMinutesAfterMidnight() which should be used instead.
    • Deprecated
    • Capabilities: Environment
    Returns
    Type
    number

    Use GetMinutesAfterMidnight instead.

  • Lighting:setMinutesAfterMidnight(minutes: number)
    Deprecated: This method is a deprecated variant of Lighting:SetMinutesAfterMidnight() which should be used instead.
    • Deprecated
    • Capabilities: Environment
    Parameters
    Parameter
    minutes: number

    Use SetMinutesAfterMidnight instead.

Events11

Inherited fromObject1
Inherited fromInstance9
Defined byLighting1