Skip to content

Ambient

Class ยท server and client scripts

Ambient controls the world's ambient illumination that fills shadows and surfaces no direct light reaches. Access it through World.Ambient.

Example

-- Server script.
World.Ambient.Source = "Color"
World.Ambient.Tint = Color.new(0.4, 0.45, 0.6)
World.Ambient.Intensity = 0.8

Source

Property
Source: "FollowBackground" | "Color" | "Disabled"

Source sets where ambient light comes from:

  • "FollowBackground": the sky, blended with Tint by Contribution; with no sky, flat Tint.
  • "Color": flat Tint on every surface.
  • "Disabled": no ambient light.

Default "FollowBackground"

Tint

Property
Tint: Color

Tint is the flat color of the ambient light.

Default Color.White

Contribution

Property
Contribution: number

Contribution is the share of ambient light taken from the sky instead of Tint, from 0 to 1. At 1, upward faces take the sky color and downward faces take ground bounce.

Default 1

Intensity

Property
Intensity: number

Intensity is the brightness of the ambient light, from 0 to 16. At 0, surfaces in shadow are dark.

Default 1