5 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Customize global lighting


Global lighting controls the overall look and atmosphere of your game. By adjusting a few properties on the Lighting service, you can change the color, shadows, time of day, and atmospheric effects of a scene.

In this section, you'll update the lighting to match the Island Jump - Final sample.

Note

Lighting is mostly configured through property values, making it a great fit for Assistant. After applying the prompt, spend some time in the viewport adjusting Ambient, ClockTime, and Density until the scene looks the way you want. For an overview of every lighting object Studio offers, see Lighting and effects.

Set lighting properties

The Lighting service controls how light behaves in your game. The sample game adjusts properties such as ambient color, lighting technology, shadow settings, and sun position to create a cooler ocean palette, sharper shadows, and stronger directional lighting.

Build with Assistant

On the Lighting service, set the following properties:
- Ambient: Color3.fromRGB(16, 16, 16)
- ColorShift_Top: Color3.fromRGB(196, 222, 255)
- OutdoorAmbient: Color3.fromRGB(134, 158, 190)
- ShadowSoftness: 0
- LightingStyle: Realistic
- ClockTime: 9
- GeographicLatitude: 78

After it runs, the world picks up a cooler blue-grey tone, shadows get hard edges, and the sun shifts to mid-morning over to the right of your sea stacks.

Build it Yourself

In the Properties window of Lighting:

  1. Tint the ambient and reflective light. Lighting.Ambient colors light in shaded areas (like the inside of your tunnel), Lighting.OutdoorAmbient colors light where the sky is visible, and Lighting.ColorShift_Top tints surfaces facing the sun. Together they pull the whole world toward a cool blue-grey ocean tone.

    1. Set Ambient to 16, 16, 16.
    2. Set ColorShift_Top to 196, 222, 255.
    3. Set OutdoorAmbient to 134, 158, 190.

A comparison between the sample Island Jump game's default and custom ambient lighting

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Default-Color.jpg" alt="The sample Island Jump game with default ambient lighting visuals." />

Default Properties

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-Color.jpg" alt="The sample Island Jump game with custom ambient lighting visuals." />

Custom Properties

  1. Switch to realistic lighting. Studio defaults to Soft, which produces a flatter look. Set LightingStyle to Realistic so local light sources cast precise shadows and illumination. Your flare will start dropping a real shadow on the platform beneath it.

    <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/LightingStyle-Soft.jpg" alt="The sample Island Jump game with Soft lighting style." />

Soft

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/LightingStyle-Realistic.jpg" alt="The sample Island Jump game with Realistic lighting produces more prominent lighting from the flare."/>

Realistic

  1. Harden shadows. Set ShadowSoftness to 0 to give shadows crisp edges. This makes the moment players step from outside into the tunnel feel more dramatic.

    <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Default-Shadows.jpg" alt="The sample Island Jump game with default shadow visuals that produce fuzzy shadows." />

Default Shadows

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-Shadows.jpg" alt="The sample Island Jump game with custom shadow visuals that produce sharp shadows."/>

Custom Shadows

  1. Move the sun. ClockTime is the time of day on a 0-24 hour scale, and GeographicLatitude rotates the world to position the sun at a different angle. The values below drop the sun toward the right of the sea stacks for longer, more directional shadows.

    1. Set ClockTime to 9.
    2. Set GeographicLatitude to 78.

Note

ClockTime and TimeOfDay are linked. Changing one updates the other, so you only need to set one.

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Default-SunPosition.jpg" alt="The sample Island Jump game with the default sun position high in the sky."/>

Default sun position

   <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-SunPosition.jpg" alt="The sample Island Jump game with a custom sun position approaching the horizon." />

Custom sun position

For an overview of the rest of the Lighting properties, see Global lighting.

Atmosphere properties

The Atmosphere object is a child of the Lighting service. It adds depth by simulating particles in the air and blending distant scenery into the sky. The two most important properties are Density, which controls the thickness of the atmosphere, and Offset, which controls where that blending begins.

Build with Assistant

On the Atmosphere object inside the Lighting service, set:
- Density: 0.375
- Offset: 0.17

Build it Yourself

  1. In the Explorer, expand the Lighting service and select its child Atmosphere object. In the Properties window:

    1. Set Density to 0.375 to thicken the air. This obscures the edge of your water terrain, so players don't see where the world ends.

      The sample Island Jump game with the default air particle density that produces a clear background.

Default air particle density

      <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-AirParticleDensity.jpg" alt="The sample Island Jump game with custom air particle density that produces a hazy background." />

Custom air particle density

1. Set **Offset** to `0.17`. Lower offset values blend distant objects into the sky, which is good for endless-feeling worlds. Higher values keep a clear silhouette. This middle value keeps the mountains you'll add next chapter visible while still giving you a hint of distant fog.

  

    

      <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-AirParticleDensity.jpg" alt="The sample Island Jump game with default Offset values that keep the background visible." />

Default Atmosphere.Offset

      <img width="100%" img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Custom-Offset.jpg" alt="The sample Island Jump game with custom Offset values that hide the edges of the background."/>

Custom Atmosphere.Offset

For more information about Atmosphere, see Atmospheric Effects.

Now that you've configured the game's lighting, the next section shows you how to replace the greybox layout with polished assets.

Pre-Customization

<img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Lighting-Pre-Customization.jpg" alt="The sample Island Jump game's lighting visuals before the customization from this page." />

Customized Visual Effects

<img src="https://prod.docsiteassets.roblox.com/assets/tutorials/core-building-and-scripting/Lighting-Post-Customization.jpg" alt="The sample Island Jump game's lighting visuals after the customization from this page." />