> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/objects/particleemitter.md).

# ParticleEmitter

For examples on how to use, refer to [ParticleService](/scripting/bedwars-scripting/services/particleservice.md).

Creates a Roblox [ParticleEmitter](https://create.roblox.com/docs/effects/particle-emitters).

### Functions

#### setTexture(texture: string)

Sets the [rbxassetid](https://create.roblox.com/docs/projects/assets) of the [texture](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Texture) of the particle emitter.

#### setColor(color: [ColorSequence](https://create.roblox.com/docs/reference/engine/datatypes/ColorSequence))

Sets the [color](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Color) of the particles emitted.

#### setRate(rate: number)

Sets the [rate](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Rate) of the particles emitted.

#### setPosition(position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3))

Sets the position of the particle emitter.

#### getPosition(): [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

Returns the position of the particle emitter.

#### setRotation(rotation: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3))

Sets the rotation of the particle emitter.

#### getRotation(): [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

Returns the rotation of the particle emitter.

#### setCFrame(cframe: [CFrame](https://create.roblox.com/docs/reference/engine/datatypes/CFrame))

Sets the CFrame of the particle emitter.

#### getCFrame(): [CFrame](https://create.roblox.com/docs/reference/engine/datatypes/CFrame)

Returns the CFrame of the particle emitter.

#### setRegionSize(size: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3))

Sets the size of the region from which particles are emitted.

#### getRegionSize(): [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)

Returns the size of the region from which particles are emitted.

#### setSize(size: [NumberSequence](https://create.roblox.com/docs/reference/engine/datatypes/NumberSequence))

Sets the [size](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Size) of the particles emitted.

#### getSize(): [NumberSequence](https://create.roblox.com/docs/reference/engine/datatypes/NumberSequence)

Returns the [size](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Size) of the particles emitted.

#### setTransparency(transparency: [NumberSequence](https://create.roblox.com/docs/reference/engine/datatypes/NumberSequence))

Sets the [transparency](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Transparency) of the particles emitted.

#### getTransparency(): [NumberSequence](https://create.roblox.com/docs/reference/engine/datatypes/NumberSequence)

Returns the [transparency](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Transparency) of the particles emitted.

#### setBrightness(brightness: number)

Sets the [brightness](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Brightness) of the particles emitted.

#### setSpeed(speed: [NumberRange](https://create.roblox.com/docs/reference/engine/datatypes/NumberRange))

Sets the [speed](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Speed) of the particles emitted.

#### setAcceleration(acceleration: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3))

Sets the [acceleration](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Acceleration) of the particles emitted.

#### setDrag(drag: number)

Sets the [drag](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Drag) of the particles emitted.

#### setLifetime(lifetime: [NumberRange](https://create.roblox.com/docs/reference/engine/datatypes/NumberRange))

Sets the [lifetime](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Lifetime) of the particles emitted.

#### setParticleOrientation(orientation: [ParticleOrientation](https://create.roblox.com/docs/reference/engine/enums/ParticleOrientation))

Sets the[ particle orientation](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Orientation) of the particles emitted. Written as `ParticleOrientation.FacingCamera`

#### setParticleRotation(rotation: [NumberRange](https://create.roblox.com/docs/reference/engine/datatypes/NumberRange))

Sets the particle rotation of the particles emitted.

#### setRotSpeed(speed: [NumberRange](https://create.roblox.com/docs/reference/engine/datatypes/NumberRange))

Sets the rotation speed of the particles emitted.

#### setLightInfluence(influence: number)

Sets the light influence of the particles emitted.

#### setLightEmission(emission: number)

Sets the light emission of the particles emitted.

#### setSquash(squash: [NumberSequence](https://create.roblox.com/docs/reference/engine/datatypes/NumberSequence))

Sets the [squash](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Squash) of the particles emitted.

#### setSpreadAngle(angle: [Vector2](https://create.roblox.com/docs/reference/engine/datatypes/Vector2))

Sets the [spread angle](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#SpreadAngle) of the particles emitted.

#### setTimeScale(timeScale: number)

Sets the [time scale](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#TimeScale) of the particles emitted.

#### setEnabled(enabled: boolean)

Enables or disables the particle emitter.

#### setLockedToPart(locked: boolean)

Sets the particle emission to be [locked](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#LockedToPart) to the emission source, or whether the particles will linger around the position they were emitted if the emission source moves.

#### emit(amount: number | nil)

[Emits](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Emit) the given amount of particles, otherwise defaults to the rate of the particle emitter.

#### clear()

[Clears](https://create.roblox.com/docs/reference/engine/classes/ParticleEmitter#Clear) any currently emitted particles.

#### destroy()

Destroys the particle emitter.
