§ How to · with Picoo
How to set up lighting and atmosphere in Roblox
By Sametcan Tasgiran, Founder & Developer·Published ·Updated
Lighting is the cheapest thing you can change that makes a Roblox game stop looking like a Roblox game.
It is also full of settings that silently cancel each other out: an Atmosphere that makes your fog values do nothing, a Technology mode where your torches cast no shadow. Picoo's cinematic_atmosphere recipe writes one 62-line server Script that sets the whole look as one theme.
Eight mood themes
dark_menacing (the default), sunset, dawn, horror_fog, neon_cyberpunk, underwater, snow_blizzard and volcano. Theme words map to the nearest one: spooky and foggy to horror_fog, neon to neon_cyberpunk, winter to snow_blizzard, lava to volcano. A word it does not recognise gets dawn.
Atmosphere, not fog
A new Atmosphere with the theme's Density, Offset, Color, Decay, Glare and Haze. dark_menacing uses Density 0.7 and Haze 1.5; horror_fog goes to 0.95 and 2.5.
Coordinated Lighting values
Brightness, Ambient, OutdoorAmbient, ClockTime and ColorShift_Top/Bottom come from the theme and are set together. Every theme also sets ShadowSoftness 0.5, GlobalShadows on and both environment scales to 0.5.
Colour grade and bloom
A ColorCorrectionEffect with the theme's Brightness, Contrast, Saturation and TintColor, plus a BloomEffect (Intensity 0.5, Size 24, Threshold 0.95) so bright sources glow.
Clean slate first
Before applying anything, the script destroys the Atmosphere, ColorCorrection, Bloom and SunRays effects already under Lighting, so two Atmospheres never fight over the look.
Optional day-night cycle
Ask for a day-night cycle and the script also advances ClockTime every second: one full day per 180 seconds by default, or the length you ask for.
Files Picoo ships for this prompt
1 file · 62 lines · one recipe call
ServerScriptService/CinematicAtmosphereSetup.lua
Server Script that runs when the game starts: clears the old effects, sets the theme's Lighting values and creates the Atmosphere, ColorCorrection and Bloom. With the day-night cycle it is 71 lines.
62 lines
Sample output: ServerScriptService/CinematicAtmosphereSetup.lua
--!strict
-- Generated by Picoo recipe: cinematic_atmosphere ("dark_menacing")
-- Coordinated Atmosphere + ColorCorrectionEffect + Lighting setup.
-- Cleans up any existing atmosphere/effects first so the look is consistent.
local Lighting = game:GetService("Lighting")
-- Step 1 — clear conflicting existing effects so the new theme reads cleanly
for _, child in ipairs(Lighting:GetChildren()) do
if child:IsA("Atmosphere") or child:IsA("ColorCorrectionEffect") or child:IsA("BloomEffect") or child:IsA("SunRaysEffect") then
child:Destroy()
end
end
-- Step 2 — coordinated Lighting properties (Brightness, Ambient, ClockTime, ShadowSoftness, ColorShift)
Lighting.Brightness = 1
Lighting.Ambient = Color3.fromRGB(40, 35, 55)
Lighting.OutdoorAmbient = Color3.fromRGB(60, 50, 80)
Lighting.ClockTime = 19.5
Lighting.ColorShift_Top = Color3.fromRGB(120, 80, 160)
Lighting.ColorShift_Bottom = Color3.fromRGB(60, 40, 100)
Lighting.ShadowSoftness = 0.5
Lighting.GlobalShadows = true
Lighting.EnvironmentDiffuseScale = 0.5
Lighting.EnvironmentSpecularScale = 0.5
-- (excerpt) after a note on Lighting.Technology, the script continues:
-- Step 3 — Atmosphere instance (Density key for the theme's "feel")
local atmosphere = Instance.new("Atmosphere")
atmosphere.Density = 0.7
atmosphere.Offset = 0.2
atmosphere.Color = Color3.fromRGB(80, 80, 90)
atmosphere.Decay = Color3.fromRGB(100, 80, 120)
atmosphere.Glare = 0.2
atmosphere.Haze = 1.5
atmosphere.Parent = Lighting
-- Step 4 — ColorCorrectionEffect for cinematic grade
local cc = Instance.new("ColorCorrectionEffect")
cc.Brightness = -0.3
cc.Contrast = 0.2
cc.Saturation = -0.4
cc.TintColor = Color3.fromRGB(180, 160, 200)
cc.Parent = LightingHow to set up lighting and atmosphere in Roblox
Nothing changes how a Roblox place feels as fast as its lighting, and nothing wastes as much time as lighting settings that quietly override each other.
The first is fog. Roblox has two depth systems: the old FogStart/FogEnd properties on Lighting, and the newer Atmosphere object. When an Atmosphere exists as a child of Lighting, the fog properties stop doing anything, not partially but entirely. Because most modern templates ship with an Atmosphere already in place, the usual experience is opening Lighting, dragging FogEnd around, and watching absolutely nothing change. Tune Density and Haze on the Atmosphere instead.
The second is shadows. Lighting.Technology looks like a quality preset and behaves like a feature switch. Voxel renders no shadows from PointLight, SpotLight or SurfaceLight. ShadowMap adds sun shadows but still not local ones. Only Future gives a torch, a lamp or a muzzle flash a real shadow, and it is genuinely heavier on low-end phones, so it is a decision, not a default. It is also a setting no script can write: you pick it in the Properties window.
After that it is composition. ClockTime and Brightness set the key light; Ambient and OutdoorAmbient decide how black your shadows go; ExposureCompensation shifts the whole image without touching individual lights. Post effects sit on top: ColorCorrection costs almost nothing and carries most of the mood, Bloom sells bright sources, and DepthOfField plus SunRays are the expensive pair that new projects reliably overuse.
One practical rule: change these as named presets, not as individual sliders. A preset that sets all of the values together can be reapplied, compared and reverted. That is how Picoo's cinematic_atmosphere recipe works. Ask for cinematic lighting, a horror mood or sunset lighting and it writes one server Script, CinematicAtmosphereSetup, for one of eight themes. When the game starts, the script removes the Atmosphere, ColorCorrection, Bloom and SunRays already under Lighting, sets Brightness, Ambient, OutdoorAmbient, ClockTime and the ColorShift pair, and creates a fresh Atmosphere, ColorCorrectionEffect and BloomEffect with the theme's values. Because it clears those effects before creating its own, applying another theme later does not stack a second Atmosphere on the first.
See more on the Luau generator, the AI Luau script writer, the 3D model generator and the game builder, read how Picoo compares with ChatGPT, or browse the full blog.
Frequently asked
Why does changing FogEnd do nothing?+
There is an Atmosphere object under Lighting. Atmosphere replaces the legacy fog system outright: while it exists, FogStart, FogEnd and FogColor are ignored. Either tune Atmosphere.Density and Haze instead, or delete the Atmosphere if you genuinely want old-style fog. Picoo's lighting recipe works on the Atmosphere and leaves the fog properties alone.
Why don't my torches cast shadows?+
Lighting.Technology. Under Voxel, PointLight, SpotLight and SurfaceLight do not cast shadows at all; ShadowMap gives you shadows from the sun but still not from local lights. Only Future shadows local lights, and it costs more on low-end devices. Technology is also the one setting you change by hand: Roblox does not let scripts or plugins write it, so select Lighting and pick Future in the Properties window.
ClockTime or TimeOfDay?+
The same value in two forms: ClockTime is a number from 0 to 24, TimeOfDay is a "HH:MM:SS" string. Set either; they stay in sync. Scripts want ClockTime because arithmetic on a number is trivial and arithmetic on a timestamp string is not. The recipe sets ClockTime from the theme, 19.5 for dark_menacing and 17.5 for sunset.
Which post effects are worth the cost?+
ColorCorrection is nearly free and does the most for mood: a little saturation and tint changes a scene completely. Bloom is cheap and sells bright light sources. DepthOfField and SunRays are the expensive ones and the easiest to overdo; on mobile they are the first things worth cutting. The recipe adds the two cheap ones and removes any SunRays already in Lighting; ask in a follow-up prompt if you want SunRays or DepthOfField added.
Does lighting have to be set on the server?+
Lighting properties replicate, so setting them on the server gives every player the same world, which is what you want for a day-night cycle. Per-player effects (a damage flash, an underwater tint) belong on the client, since they are not part of the shared world state. The recipe's script is a server Script in ServerScriptService, so the look appears when the game starts, not in Edit mode.
Related Picoo prompts
Roblox day night cycle
Example build: 3 files · 90 lines. Picoo writes this code for each prompt, so file names and line counts vary from run to run. A full day takes 24 real minutes in this example.
custom camera in Roblox
Cameras are client-only, and every reliable camera in Roblox comes down to three things: the right CameraType, the right update event, and framerate-independent smoothing. Picoo's camera_system recipe writes one 135-line LocalScript that gets all three right.
Roblox magic spell system
7 files · 422 lines · one recipe call. Three scripts, a folder with two RemoteEvents, and a hotbar ScreenGui you can restyle in Edit mode.