Atmosphere
Atmosphere : Instance
Overview
The Atmosphere object utilizes particle density, fog, and color to create realistic atmospheric effects.
Properties
Density
number
This property sets the density of particles in the air.
The higher the value, the hazier and more foggy the atmosphere becomes.
Code Samples
local Lighting = game:GetService("Lighting")
local Atmosphere = Lighting:WaitForChild("Atmosphere")
Atmosphere.Density = 0.2
FogFalloffClear
number
This property controls how quickly particles fade with distance.
Lower values sustain fog over longer distances, while higher values cause faster attenuation at closer ranges.
Code Samples
local Lighting = game:GetService("Lighting")
local Atmosphere = Lighting:WaitForChild("Atmosphere")
Atmosphere.FogFalloffClear = 0.1
StartDistance
number
This property sets the distance at which particles begin to appear.
Lower values initiate fog at closer distances, while higher values start fog farther away.
Code Samples
local Lighting = game:GetService("Lighting")
local Atmosphere = Lighting:WaitForChild("Atmosphere")
Atmosphere.StartDistance = 1000
Color
Color3
This property sets the atmosphere’s color.
Code Samples
local Lighting = game:GetService("Lighting")
local Atmosphere = Lighting:WaitForChild("Atmosphere")
Atmosphere.Color = Color3.new(255, 0, 0)
Methods
Events
Last updated