Codectionary / Developer documentation / Luau

ParticleEmitter

Create repeating or manually triggered particle effects.

Why use ParticleEmitter?

ParticleEmitter produces a visual effect from a BasePart or Attachment. Automatic emission is controlled by Enabled and Rate; Emit creates a burst on demand.

Try it in Roblox Studio

Create a Part named SparkSource in Workspace and run this Script from ServerScriptService. The effect is visual; the default particle texture may be changed in Studio.

Syntax

emitter:Emit(20)

Examples

ParticleEmitter

Emit a short particle burst without continuous emission.

local source = workspace:WaitForChild("SparkSource")
assert(source:IsA("BasePart"))
local emitter = Instance.new("ParticleEmitter")
emitter.Enabled = false
emitter.Lifetime = NumberRange.new(0.5, 1)
emitter.Speed = NumberRange.new(3, 6)
emitter.Parent = source
emitter:Emit(20)
  1. The emitter is parented to a BasePart, so particles originate from that object.
  2. Enabled = false prevents a steady stream; Emit(20) requests one burst of 20 particles.
  3. Lifetime and Speed control how long particles remain and their initial movement.

Best practices

  • Limit particle counts on lower-power devices.
  • Use custom textures only when you have permission to use the asset.

Runtime & versions

Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.

Luau documentation

Specifications & further reading