Skip to content

Extended from BaseObject Particle

Warning

Currently it's recommended to use sprites to make particles/vfx, this class is in experimental state and can change a lot

_____
This class is used for vfx

Properties

Vector2 Angle

Depending on the value the particles will be more dispersed

TweenInfo Info

Is the tween info of the tween which is going to be used to move the particles

boolean TrackLight

Warning

    Experimental, dont use

boolean CanCollide

Warning

    Experimental, dont use

boolean Enabled

When its enabled new particles can be emitted

number MaxRate

Is the maximum amount of particles that can exist at the same time

number Units

Is the amount of particles that are existing at this moment

number LightBrightness

Warning

    Experimental, dont use

number LightRange

Warning

    Experimental, dont use

number Range

Is the distance that can be traveled by each particle

number LifeTime

The number of seconds the particle will be active before being destroyed

number Clock

Used for internal purposes

number Rate

Is the amount of particles which is going to be generated

Character Subject

The subject which is going to be the center of emission of the particle, a character, sprite, etc...

table Properties

Is a table with the initial properties of the particle which is going to be generated

{
    Image: string,
}

table Goals

Is a table with the goals of the particles

{
    Size: UDim2,
    ImageTransparency: number,
}

Methods

Particle Constructor()

void SetSubject(subject: Character)

Sets the subject property

void SetAngle(Angle: Vector2)

Sets the angle property of the particle

void SetMaxRate(maxRate: number)

Sets the maximum amount of particles that can exist at the same time

void Emit(rate: number)

Emits the specified amount of particles, if none is provided then will use as amount the Rate property

Events

Name
Description