PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

LightInfluence

ParticleEmitter

float

The LightInfluence property determines how much environment light affects the color of individual particles when they are rendered. It must be in the range [0, 1]; behavior of values outside of this range are not defined. At 0, particles are not influenced by light at all (they retain full brightness), and at 1 particles are fully influenced by light (in complete darkness, particles will be black).

Pictured below are three default ParticleEmitters at night with varing LightInfluence. There is a PointLight with sufficient PointLight/Brightness and PointLight/Range to light the particles near to their parent parts. Take note of how each particle is affected by the lack of light close to the end of their lifetime.

Three default ParticleEmitters with varying LightInfluence values

By default, this value is 1 if inserted with Studio tools. If inserted using Instance.new, it is 0.


Code Samples


Creating a Particle Emitter from Scratch

This rather lengthy code sample shows how every property of a ParticleEmitter can be set, including DataType/NumberRange, DataType/NumberSequence and DataType/ColorSequence properties. Below is how the ParticleEmitter should after every property is set. Try playing around with the different properties to customize how the effect looks!

The final product