This event fires when a
Lighting property is changed or a
Sky is added or removed from
Although this event fires when most properties of
Lighting are changed, developers should be aware of the few exceptions:
Lighting/GlobalShadowswill not fire this event
- The fog properties,
Lighting/FogEndwill not fire this event
In cases where this behavior is not desired, the
Instance/Changed event or
Instance/GetPropertyChangedSignal function can be used.
The following code would print Skybox has changed whenever you changed the Lighting’s SkyBox. The opposite will be printed when the adverse is true.
game.Lighting.LightingChanged:Connect(function(skyboxChanged) if skyboxChanged then print("Skybox has changed") else print("The skybox did not change.") end end)