Reference API Roblox

Engine API

Website

Related

Reference API Roblox

ParticleEmitter

A special object that emits customizable 2D particles into the world.

Member index 40

HistoryMember
553Acceleration: Vector3
553Brightness: float
553Color: ColorSequence
553Drag: float
553EmissionDirection: NormalId
553Enabled: bool
553FlipbookFramerate: NumberRange
553FlipbookIncompatible: string
553FlipbookLayout: ParticleFlipbookLayout
553FlipbookMode: ParticleFlipbookMode
553FlipbookStartRandom: bool
553Lifetime: NumberRange
553LightEmission: float
553LightInfluence: float
553LockedToPart: bool
553Orientation: ParticleOrientation
553Rate: float
553RotSpeed: NumberRange
553Rotation: NumberRange
553Shape: ParticleEmitterShape
553ShapeInOut: ParticleEmitterShapeInOut
553ShapePartial: float
553ShapeStyle: ParticleEmitterShapeStyle
553Size: NumberSequence
553Speed: NumberRange
553SpreadAngle: Vector2
553Squash: NumberSequence
645Texture: ContentId
553TimeScale: float
553Transparency: NumberSequence
553VelocityInheritance: float
553VelocitySpread: float
576WindAffectsDrag: bool
553ZOffset: float
573Clear(): null
573Emit(particleCount: int = 16): null
573FastForward(numFrames: int): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 1

HistoryMember

Description

A ParticleEmitter is a special object that emits customizable 2D particles into the world. To emit and render particles, it must be parented to a BasePart or an Attachment within such a part. When parented to a BasePart, particles spawn randomly within the part's bounding box or shape; when parented to an Attachment, particles spawn from the attachment's position.

Particles emit automatically when the emitter is Enabled with a non-zero Rate, or manually when the Emit method is called. With a non-zero Speed, particles are set in motion outwards and/or inwards, depending on the ShapeInOut property.

By default, particles face the camera, but the Orientation can be modified to respect the particle velocity instead.

During the Lifetime of the particles, they can change appearance according to the Color and Size. Their motion can change over time according to the Drag and Acceleration properties, and they can also move as their parent moves when they are LockedToPart or have a non-zero VelocityInheritance.

To learn more about creating and customizing particle emitters, see Particle Emitters.

History 142

Members 40

Acceleration

TypeDefault
Vector30, 0, 0

The Acceleration property determines how the Speed of particles changes over their lifetime. It is defined using a Vector3 to determine the acceleration on the global X/Y/Z axes and is measured in studs per second squared. When changed, this property affects all particles emitted by the emitter, both current and future.

Acceleration will slow particles down if the vector points in the opposite EmissionDirection in which they are emitted. Otherwise, it will speed them up.

History 6

Brightness

TypeDefault
float1

Scales the light emitted from the emitter when ParticleEmitter.LightInfluence is 0.

History 2

Clear

Parameters (0)
No parameters.
Returns (1)
null

The Clear method instantly clears all existing particles that have been emitted by the ParticleEmitter through its natural emission (non-zero Rate on an Enabled emitter) or via Emit().

History 3

Color

TypeDefault
ColorSequence0 1 1 1 0 1 1 1 1 0

The Color property determines the color of all active particles over their individual lifetimes. The color applies to the Texture when rendering and it uses the texture alpha along with the emitter's Transparency. If an emitter has a LightEmission value that's greater than 0, darker colors make particles appear more transparent.

Changing this property affects all particles emitted by the emitter, both current and future.

When this property uses a gradient ColorSequence, a particle's present color is determined by linearly interpolating on the sequence using the particle's age and its total lifetime. For example, if a particle spawned 2 seconds ago and has a 4 second lifetime, the color will be whatever is 50% of the way through the ColorSequence.

History 6

Drag

TypeDefault
float0

The Drag property determines the rate in seconds at which individual particles will lose half their speed via exponential decay. Drag is applied by scaling the expected velocity from Speed and any velocity inherited from the parent from VelocityInheritance. Setting this property to a negative value will cause particles' velocities to grow exponentially.

History 4

  • 553 Change Default of Drag from to 0
  • 486 Change ThreadSafety of Drag from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Drag from to ReadOnly
  • 209 Add Drag

EmissionDirection

TypeDefault
NormalIdTop

The EmissionDirection property determines the face (NormalId) of the parent object that particles emit from. A negative Speed means particles emit in the opposite direction. SpreadAngle further varies the emission direction.

If you add a ParticleEmitter to an Attachment, which has a direction, you can rotate the attachment itself (Attachment.Orientation) instead of using this property.

History 4

Emit

Parameters (1)Default
particleCountint16
Returns (1)
null

The Emit method will cause the ParticleEmitter to instantly emit the given number of particles.

History 3

Enabled

TypeDefault
booltrue

The Enabled property determines if particles emit from the emitter. Setting this to false stops further particles from spawning, but any existing particles remain active until they expire. This property is useful when you have a pre-made particle effect that you want to remain disabled until you need it to emit particles.

If you want to clear all particles from a disabled emitter, call Clear(). Then, if desired, call Emit() on the emitter to emit and render particles.

History 6

FastForward

Parameters (1)
numFramesint
Returns (1)
null

History 2

FlipbookFramerate

TypeDefault
NumberRange1 1

The FlipbookFramerate property determines how fast the flipbook texture animates in frames per second. Like Lifetime, you can set a minimum and maximum range to randomize the framerate of the flipbook, with a maximum of 30 frames per second.

History 2

FlipbookIncompatible

TypeDefault
stringParticle texture must be 1024 by 1024 to use flipbooks.

The error message to display if the Texture is incompatible for a flipbook. The flipbook texture must be of pixel dimensions 8×8, 16×16, 32×32, 64×64, 128×128, 256×256, 512×512, or 1024×1024.

History 2

FlipbookLayout

TypeDefault
ParticleFlipbookLayoutNone

The FlipbookLayout property determines the layout of the texture. It can be any value of the ParticleFlipbookLayout enum:

  • None – Disable flipbook features and use the texture as a single static texture over the particle's lifetime.
  • Grid2x2 – 2×2 frames for a 4-frame animation.
  • Grid4x4 – 4×4 frames for a 16-frame animation.
  • Grid8x8 – 8×8 frames for a 64-frame animation.

History 2

FlipbookMode

TypeDefault
ParticleFlipbookModeLoop

The FlipbookMode property determines the type of the flipbook animation. It can be any value of the ParticleFlipbookMode enum:

  • Loop – Continuously play through all frames, starting back at the first frame after playing the last.
  • OneShot – Play through the animation only once across the particle's lifetime. With this setting, the FlipbookFramerate property doesn't apply; instead, the framerate is determined by the particle's Lifetime divided evenly by the number of frames in the animation. OneShot animations are useful for clear non-repeating animations, such as an explosion that creates a puff of smoke and then fades out.
  • PingPong – Play from the first to the last frame, then in reverse from the last to the first, repeating throughout the Lifetime of the particle.
  • Random – Play the frames in a random order, blending/crossfading from one frame to the next. This can be useful for organic particle textures at low framerates, such as stars slowly twinkling between subtly different shapes.

History 2

FlipbookStartRandom

TypeDefault
boolfalse

The FlipbookStartRandom property determines whether each particle begins at a random frame of the animation instead of always starting at the first frame. One use case is to enable this property and also set FlipbookFramerate to zero, causing each emitted particle to be a static frame chosen randomly from the flipbook texture.

History 2

Lifetime

TypeDefault
NumberRange5 10

The Lifetime property defines the maximum and minimum ages for newly emitted particles. Lifetimes are stored on a per-particle basis, so if this value is changed, existing particles will stay active until their randomly chosen lifetime ends. A lifetime of 0 will prevent particles from emitting at all.

History 6

LightEmission

TypeDefault
float0

The LightEmission property determines the blending of the Texture colors with the colors behind them. A value of 0 uses normal blending mode while a value of 1 uses additive blending. When changed, this property instantly affects all particles owned by the emitter, both current and future.

This property should not be confused with LightInfluence which determines how particles are affected by environmental light.

This property does not cause particles to light the environment around them. To accomplish that, consider using a PointLight.

History 6

LightInfluence

TypeDefault
float0

The LightInfluence property determines how much environmental light affects the color of individual particles when they render. It must be in the range of 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); at 1, particles are fully influenced by light (in complete darkness, particles will be black).

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

History 4

LockedToPart

TypeDefault
boolfalse

The LockedToPart property determines if particles "stick" to the emission source (the Attachment or BasePart to which the ParticleEmitter is parented). If true, active particles will move in lock step if the parent object moves.

Alternatively, consider using the VelocityInheritance property with a value of 1 which may be more appropriate for some effects.

History 4

Orientation

TypeDefault
ParticleOrientationFacingCamera

The Orientation property determines which orientation mode to use for an emitter's particle geometry.

OrientationParticle Behavior
FacingCameraStandard camera-facing billboard quad; default behavior.
FacingCameraWorldUpFacing the camera, but rotating only on the vertical upward world Y axis.
VelocityParallelAligned parallel to their direction of movement.
VelocityPerpendicularAligned perpendicular to their direction movement.

History 3

Rate

TypeDefault
float20

The Rate property determines how many particles are emitted per second while the emitter is Enabled. It is the inverse of frequency, meaning that a rate of 5 emits a particle every 0.2 seconds. When changed, this property has no affect on any active particles.

History 6

RotSpeed

TypeDefault
NumberRange0 0

The RotSpeed property determines a random range of angular speeds for newly emitted particles, measured in degrees per second. A random angular speed is chosen upon emission, so changing this property doesn't affect active particles. This property, along with Rotation, affects the angle of the rendered particle image.

Particles with very high angular speeds can appear to rotate slower or not at all, since the angle of rotation is synchronized with the software render speed. For example, if particles rotate at exactly 360 degrees every frame, there will be no apparent change in rotation.

History 6

Rotation

TypeDefault
NumberRange0 0

The Rotation property determines the range of rotations in degrees for newly emitted particles, measured in degrees. Positive values are in the clockwise direction. This property is commonly set to [0, 360] to provide a completely random rotation to new particles. RotSpeed also influences the rotation of a particle over its lifetime.

Changes to this value only affect new particles; existing particles maintain the rotation at which they were originally emitted.

History 6

Shape

TypeDefault
ParticleEmitterShapeBox

The Shape property sets the shape of the emitter to either a box, sphere, cylinder, or disc. After you make a selection, you can adjust the ShapeStyle, ShapeInOut, and ShapePartial properties to further customize particle emission. For visual examples, see here.

History 2

ShapeInOut

TypeDefault
ParticleEmitterShapeInOutOutward

Sets whether particles emit outward only, inward only, or in both directions. For visual examples, see here.

History 2

ShapePartial

TypeDefault
float1

Depending on the Shape value, this property performs a different action:

  • For cylinders, it specifies the top radius proportion. A value of 0 means the top of the cylinder has zero radius, making it a cone. A value of 1 means the cylinder has no deformation.

  • For discs, it specifies the inner radius proportion. A value of 0 means the disc is fully closed (circle/ellipse), while a value of 1 means emission only occurs on the outermost rim of the disc. Values between 0 and 1 emit from an annulus with a certain thickness.

  • For spheres, it specifies the hemispherical angle over which particles emit. A value of 1 means particles emit from the entire sphere; a value of 0.5 means particles emit from a half-dome; a value of 0 means particles only emit from a single point at the north pole.

For visual examples, see here.

History 2

ShapeStyle

TypeDefault
ParticleEmitterShapeStyleVolume

Sets particle emission to either volumetric or surface-only emission. For visual examples, see here.

History 2

Size

TypeDefault
NumberSequence0 1 0 1 1 0

The Size property determines the world size of all active particles over their individual lifetimes. This property represents the dimensions of the square Texture for each particle. It is a NumberSequence that works similarly to Transparency.

A particle's present size is determined by linearly interpolating on this sequence using the particle's age and its total lifetime. For example, if a particle spawned 2 seconds ago and has a 4 second lifetime, the size will be whatever is 50% of the way through the NumberSequence. For any NumberSequenceKeypoint with a non-zero envelope value, a random value in the envelope range is chosen for each keypoint for each particle when it emits.

History 6

Speed

TypeDefault
NumberRange5 5

The Speed property determines a random range of velocities (minimum to maximum) at which new particles will emit, measured in studs per second. Each particle's velocity is chosen upon emission and it applies in the EmissionDirection. Negative values cause particles to travel in reverse.

Note that changing Speed does not affect active particles and they retain whatever speed they already have. However, Acceleration, Drag, and VelocityInheritance can be used to affect the speed of active particles over their lifetime.

History 6

SpreadAngle

TypeDefault
Vector20, 0

The SpreadAngle property determines the random angles at which a particle may be emitted. For example, if the EmissionDirection is Top (+Y), this Vector2 describes the size of the random angle spread on the X/Z axes, in degrees.

Setting one axis to 360 will cause particles to emit in all direction in a circle. Setting both to 360 will cause particles to emit in all directions in a sphere.

History 4

Squash

TypeDefault
NumberSequence0 0 0 1 0 0

Allows for non-uniform scaling of particles, curve-controlled over their lifetime. Values greater than 0 cause particles to both shrink horizontally and grow vertically, while values less than 0 cause particles to both grow horizontally and shrink vertically.

History 2

Texture

TypeDefault
ContentIdrbxasset://textures/particles/sparkles_main.dds

The Texture property determines the image rendered on particles. This image is influenced by Color, Transparency, LightInfluence, and LightEmission. Textures with transparent backgrounds work best for particles.

History 7

TimeScale

TypeDefault
float1

A value between 0 and 1 that controls the speed of the particle effect. At 1, it runs at normal speed; at 0.5 it runs at half speed; at 0 it freezes in time.

History 3

Transparency

TypeDefault
NumberSequence0 0 0 1 0 0

The Transparency property determines the transparency of all active particles over their individual lifetimes. It works similar to Size in how it affects particles over time. In terms of rendering, a value of 0 is completely visible (opaque) and a value of 1 is completely invisible (not rendered at all).

A particle's present transparency is determined by linearly interpolating on this sequence using the particle's age and its total lifetime. For example, if a particle spawned 2 seconds ago and has a 4 second lifetime, the transparency will be whatever is 50% of the way through the NumberSequence. For any NumberSequenceKeypoint with a non-zero envelope value, a random value in the envelope range is chosen for each keypoint for each particle when it emits.

History 6

VelocityInheritance

TypeDefault
float0

The VelocityInheritance property determines how much of the parent part's Velocity is inherited by particles when they are emitted. A value of 0 means that no velocity is inherited, while a value of 1 means the particle will have the exact same speed as the parent BasePart.

When used in conjunction with Drag, a particle emitter can appear to "shed" particles from a moving part.

History 4

VelocitySpread

TypeDefault
float0

This property determines how offset a particle can be fired from the local emitter direction of its parent. When a particle is created its offset is picked randomly between 0 and VelocitySpread. This value is measured in degrees.

This property is deprecated. It exists only for backward compatibility, and should not be used for new work. SpreadAngle should be used instead.
This property is not replicated. Its interface does not cross the network boundary.

History 8

Tags: [NotReplicated, Deprecated]

WindAffectsDrag

TypeDefault
boolfalse

If true, emitted particles follow the Workspace.GlobalWind vector. Only applies if the Drag property is greater than 0.

History 1

ZOffset

TypeDefault
float0

The ZOffset property determines the forward-backward render position of particles, in studs, without changing their size on the screen. When changed, this property affects both current and future particles. Note that this property accepts fractional values; it is not like GuiObject.ZIndex (an integer).

Positive values move particles closer to the camera and negative values move particles away. Sufficiently negative values can cause particles to render inside or behind the parent part.

History 6

Removed members 1

Settings