Skip to content

Particle

A Particle is an object that represents a single Particle, usually created by a PartEmitter.



Creating a new Particle


Particle Particle.new(table particleProperties, table physicalProperties, Vector3 position, Vector3 velocity, boolean isRigidBody?, Instance parent?)

Creates a new Particle object. ParticleProperties includes information on how the Particle should look and act, physicalProperties contains information on collisions, position is the position where the Particle will spawn, velocity is the Particle's intial velocity, isRigidBody determines if the Particle will act like a rigid body object and parent determines the Particle's parent.

Important

This is a constructor function mainly used by the PartEmitter class. Generally speaking there is no need for the user to use this function.



Properties


string UUID

A unique identifier for this Particle.


ParticleEmitter ParticleEmitter

The ParticleEmitter used to emit a single particle, which will then stay locked to the Particle's Part.


BasePart Part

This Part acts as the collider for this Particle.


Attachment Attachment

Attachment in the centre of the Part, acting as the Parent for the ParticleEmitter. This ensures the visible particle is exactly where it's collider is.


Vector3 Velocity

Velocity vector of the Particle.

Note

If IsRigidBody is true, Velocity will only be applied initally when the Particle is created. After that the Particle's movement will be entirely controlled by the physics engine.


Vector3 Acceleration

Constant acceleration applied to the Particle.

Warning

This property is overridden if IsRigidBody is true.


float CreationTime

Time when the Particle was created.


RBXScriptConnection HeartbeatConnection

This Particle's connection to the Heartbeat event. Used for updating the Particle's position and Part size, as well as removing the Particle once it reaches its assigned lifetime.



Methods


void Destroy()

Destroys all instances associated with the Particle and the Particle object itself. This method is also called automatically when the Particle's age reaches its lifetime.



Events


RBXScriptSignal Touched(BasePart otherPart)

Same as Particle.Part.Touched.


RBXScriptSignal Destroying()

This event fires when the Particle's Destroy method is called.