Skip to content

Lifecycle

The plugin module exports three lifecycle methods. Two of them you call. One of them you read from.

Wakes the engine. Starts the Heartbeat connection that drives every active particle’s per-frame update. Without it, :Emit, :EnableEmit, and :EmitAnimate still spawn clones — they just never tick. The clones sit frozen at their initial CFrame and pile up forever, since the Heartbeat is what moves them, runs their graphs, and destroys them when their lifetime ends. So always :Activate before any emit call.

local Part_Icles = require(game.ReplicatedStorage:WaitForChild("Part_Icles"))
Part_Icles:Activate()
-- now safe to emit
Part_Icles:Emit(workspace.MySpark)

In Studio, the plugin activates the runtime itself when the plugin loads — there’s no toolbar toggle to flip; the runtime is already up by the time you start authoring. In a published game, your script must call :Activate() explicitly before any emission.

:Activate is idempotent — calling it twice is a no-op.

Stops the Heartbeat connection and tears down the live state. Every in-flight Emit-mode clone is destroyed, every running :Enable loop is cancelled, pinned textures are released, and the runtime folder is destroyed.

For Animate-mode entries the cleanup splits by type:

  • 3D types (Part, Attachment, Beam, Model) animate the source in place, not a clone. Deactivate restores the source’s starting CFrame and flips Enabled = false on Beams. The source instance itself is left intact — it’s your authoring item, not something the runtime owns.
  • Screen-space types (Blur, Bloom, ColorCorrection, Atmosphere) and ImageLabel use a singleton clone. Deactivate destroys that clone — the source is unaffected.
Part_Icles:Deactivate()

Safe to call multiple times — re-entries are no-ops once everything is already torn down.

Mostly used when the plugin’s Studio UI shuts down. Shipped games rarely need it: a session-long emitter typically just stays activated until the player leaves.

Returns the bucket folder where emitted Part / Attachment / Model clones get parented. Lazy-created on first call. Lives under workspace.Terrain to keep the clones out of the explorer’s main listing and out of place-file saves.

local folder = Part_Icles:GetFolder()

workspace.Terrain is the parent for two reasons: emitted clones can’t be picked in the explorer’s workspace listing, and Archivable = false on the folder keeps the clones out of undo history and place-file saves.

You usually don’t need this directly — it’s exposed for tools that need to walk the runtime hierarchy. Other emit destinations (PointLights stay on the source, screen effects parent to Lighting, ImageLabel emissions live in an internal ScreenGui) aren’t reachable through this method.

With the engine activated, you can emit. The next chapter — Emission — covers the six top-level dispatchers: :Emit, :EmitAnimate, :Enable, :EnableEmit, :Disable, :AbsoluteEmit, and the relationship between them.