Skip to content

Lighting

Service Object

This object is automatically created by Polytoria. Additionally, scripts cannot change its parent.

Not newable

This object cannot be created by scripts using Instance.New().

Lighting is responsible for controlling the state of the lighting in the place. It provides many different options for creators to enhance and fine-tune the visuals of their worlds.

By parenting an ImageSky object to Lighting, you can change the skybox of the world.

Inherits Instance

Properties

AmbientColor : Color

Determines the color of the ambient light. Ambient light is light that is not coming from any particular direction, and is used to simulate light bouncing off of surfaces.

This property is only used if AmbientSource is set to AmbientSource.AmbientColor.

AmbientSource : AmbientSource

Determines the source of the ambient light

SunBrightness : float

Determines the brightness of the sun

SunColor : Color

Determines the color of the sun. This affects the color of the ambient lighting in the environment.

Shadows : boolean

Determines whether or not shadows are enabled