GSmGpE6CwX2y9JjB25B8
We use cookies on this site to enhance your user experience

Sep 17 2019, 5:56 PM PST 5 min

Particle emitters create special effects like fire, smoke, and sparks by using 2D images in combination with properties such as color and size.

Creating a Particle Emitter

All particle emitters must be parented to an object of the BasePart class such as a Part or MeshPart.

To create a particle emitter:

  1. Select the object in the Explorer window and insert a ParticleEmitter using the icon.
Once created, it will emit particles in that part's area. Its parent object also determines the emitter's direction and rotation.
Small area compacts particles
Large area spreads particles out
Part rotation alters direction
  1. To change the direction of a particle effect without re-orienting its parent part, use the emitter’s EmissionDirection property.
Front EmissionDirection
Bottom EmissionDirection

Customizing Particles

Once an emitter is added, you can modify the effect through its properties. Below are some common properties of particle emitters.

Texture

Changes the image used by particles. To import a particle image, see /articles/game assets#images|Game Assets.

Same particle settings with different textures

Color

This property tints the particle texture with a specific color. Colors can be selected in three ways:

A
Click on the color square to open the color picker.
B
Input three numbers for an RGB color value.
C
Create a color sequence for displaying different colors over time.
Single color
Color sequence

To modify a sequence:

  • Click on an existing marker arrow to select a point in the sequence.
  • With a marker selected, you can then change the color.
  • Additional markers can be inserted by clicking a point along the timeline. These can be moved by dragging them left/right, or deleted by clicking the Delete button.

Size

The size of particles is measured in studs. Size can be defined in two ways:

A
Input a number for a consistent size.
B
Create a size sequence to change the size of particles over time.

Using a sequence, particle size can change over time. A sequence starts at 0, the start of emitting, and ends at 1, the lifetime of a particle.

  • To change the size at a point, click on a marker and drag it up or down. Values can also be typed in the Value field to specify the size at that marker.
  • To insert new markers, click on any point in the graph.
  • To add a random range for size, click on any marker and drag the envelope lines up or down. At that time, particles will be a random size between the red envelope.

Lifetime

Particle lifetime is defined in seconds. Lifetime can be one consistent value or a minimum/maximum range formatted like Min, Max. The maximum lifetime is 20 seconds.

Rate

This specifies the number of particles created per second. A single emitter can create up to 500 particles per second.

Other Properties

Below are some properties used to further customize particles.

Property Description
ParticleEmitter/Acceleration|Acceleration Determines the direction of acceleration for particles. This can be used to create effects such as particles being affected by wind.
ParticleEmitter/Drag|Drag The rate in seconds that particles lose half their speed.
ParticleEmitter/Rotation|Rotation The angle of rotation for newly created particles. Single numbers will create particles at that angle. Using two numbers (minimum, maximum) will set a random rotation for each particle.
ParticleEmitter/RotSpeed|RotSpeed The speed of rotation for particles when created. This can be a single number or a number range for randomized speed. Negative values cause particles to rotate counter-clockwise.
ParticleEmitter/Speed|Speed The speed of particle movement, measured in studs. This can be a single number or a number range for randomized speed. Negative values cause particles to move in reverse.
ParticleEmitter/Transparency|Transparency The transparency of all active particles over their individual lifetimes. This can be a number between 0–1 or a sequence defined similarly to a size sequence.
ParticleEmitter/ZOffset|ZOffset Controls the forward/backward position of how particles are rendered, measured in studs. Useful in situations where you have more than one particle emitter in the same area.

Emitter Examples

The following emitters can be achieved by creating a new ParticleEmitter and changing the listed properties to the highlighted values.

Properties - ParticleEmitter "ParticleEmitter"
LightEmission 0.5
Texture rbxhttp://asset/?id=3909691881
Drag 1
Lifetime 5
RotSpeed -100, 100
Properties - ParticleEmitter "ParticleEmitter"
Color  
<ColorSequence>
LightEmission 0.7
Size
<NumberSequence>
Texture rbxhttp://asset/?id=3916143220
Transparency
<NumberSequence>
Lifetime 3
Rate 10
Properties - ParticleEmitter "ParticleEmitter"
Color   [255, 74, 29]
LightEmission 0.8
Size 5
Texture rbxhttp://asset/?id=3916186365
Transparency
<NumberSequence>
Lifetime 2
Rate 5
Rotation 0, 360
RotSpeed 100
Speed 0
Tags:
  • particles
  • emitter
  • lighting
  • fire
  • smoke