roblox-vfx
Build or optimize Roblox particles, beams, trails, and highlights. Use for emitter shapes, flipbooks, one-shot bursts, animation-marker effects, distance culling, and overdraw.
Install
npx skills add https://github.com/nonlooped/roblox-suite/tree/main/roblox-vfx
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install nonlooped-roblox-suite@llmmart
git clone https://github.com/nonlooped/roblox-suite.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole nonlooped/roblox-suite collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
roblox-vfx
Main source: https://create.roblox.com/docs/en-us/effects/particle-emitters + the Effects section of the docs and the ParticleEmitter class reference.
Tune particle lifetime, size, transparency, and rate together. Profile overlapping transparent effects on the lowest target device.
For marker-triggered bursts, read roblox-animation. For UI particles, read roblox-user-interfaces; ParticleEmitters do not render inside ViewportFrame.
Core creation and parenting
- Parent ParticleEmitter to a BasePart (emission fills bounds or chosen EmissionDirection face) or (strongly preferred for control) to an Attachment.
- Rotate the parent or the attachment to steer emission. EmissionDirection is ignored when parented to an Attachment; rotate the Attachment itself to aim particles.
- EmissionDirection only matters when parented to a part.
Tune particle appearance
- Texture (prefer .png with alpha; grayscale + LightEmission=1 to hide dark areas).
- Color (ColorSequence; even a single Color3 in Studio is stored as a one-keypoint ColorSequence; use it for gradients over lifetime).
- Size (NumberSequence, often with envelope for natural variation). Warning: Large sizes = high GPU fill-rate cost.
- Transparency (NumberSequence). Fade particles in or out to avoid popping.
- Lifetime (or NumberRange for per-particle random).
- Rate (particles per second; hard caps ~400 desktop / 100 mobile per emitter; keep low and achieve density with other properties).
Then motion (Speed at birth, SpreadAngle, Acceleration for gravity/wind, Drag + WindAffectsDrag when global wind is enabled, VelocityInheritance, LockedToPart, TimeScale).
Emitter shapes
Shape = Box / Sphere / Cylinder / Disc.
- ShapeStyle = Volume (everywhere inside) or Surface (only the skin).
- ShapeInOut = Inward / Outward / InAndOut.
- ShapePartial further modulates the shape. Cylinder: radius on the emission side. Disc: inner-radius proportion (
0= fully closed disc,1= emission only on the outer rim). Sphere: hemispherical angle (1= full sphere,0.5= half-dome,0= point).
Sphere/Cylinder shapes do not display correctly when the emitter is parented to an Attachment. Only use them with a BasePart parent (the part can be tiny and invisible).
Flipbooks (animated textures over particle life)
Prepare a grid sheet (2x2, 4x4, 8x8, Custom) with transparent spacing between frames (to prevent mip filtering from sampling adjacent frames).
- FlipbookLayout, FlipbookSizeX/Y.
- FlipbookFramerate (or random range, max 30).
- FlipbookMode: Loop, OneShot (explosions; ignores
FlipbookFramerateand plays exactly once over the particle Lifetime), PingPong, Random (with crossfade; great for organic variation). - FlipbookBlendFrames: crossfade between adjacent frames in Loop/OneShot/PingPong for smoother animation.
- FlipbookStartRandom: each particle starts at a random frame (useful when framerate is 0 for static but varied look).
Memory warning: Flipbooks are heavier. Reuse textures, keep resolution reasonable, limit unique animated emitters on low-memory clients (older phones will auto-disable flipbooks).
Lighting and rendering controls
- LightEmission: 0 normal, 1 additive/glow (works even in dark scenes).
- LightInfluence: 0 = ignore world light, 1 = fully affected.
- Brightness: scales the light the emitter contributes when
LightInfluenceis 0. No effect whenLightInfluenceis 1. - Orientation: FacingCamera (classic billboard), FacingCameraWorldUp, VelocityParallel, VelocityPerpendicular.
- ZOffset: render layer offset in studs (layer multiple emitters without moving them in 3D).
Performance across devices
- Fill rate (pixels covered by overlapping transparent layers) and overdraw are the main GPU costs.
- Rate × Size × average opacity × how many overlap on screen = cost.
- Always test at both lowest and highest Studio Editor Quality Level.
- Mobile rate is capped lower.
- Use .Enabled = false to pause (existing particles continue until they die or you call :Clear()).
- Many simultaneous high-rate/large/transparent emitters will cause the engine to throttle or drop effects on low-end clients.
- Measure overdraw in Studio with View → Stats → GPU → Fill Rate and Render → Overdraw. Reduce total opaque pixel area before lowering Rate.
Replication and client-authoritative emission
- ParticleEmitter state replicates, but individual particles do not. A server-owned emitter will spawn the same particles on every client automatically.
- For one-shot bursts, prefer client-authoritative emission: the server signals an event, each affected client spawns the burst locally. This avoids network replication of per-burst timing and respects each client's quality settings.
- Use
RemoteEvent:FireClientor a local signal so clients own transient visuals; keep gameplay logic authoritative on the server.
LOD and distance culling
- Stop or reduce expensive emitters when the camera is far away. Common thresholds: disable at 100–300 studs, reduce Rate by half at half-distance.
- Use
workspace.CurrentCameradistance checks or zone systems. Avoid per-frameMagnitudechecks for many emitters; instead use a tagged culling heartbeat or spatial partition. - For ambient weather/large crowds, spawn emitters only in the near-camera region rather than globally.
Preloading textures
- Call
ContentProvider:PreloadAsync({texture})for flipbook atlases and prominent effect textures before they are needed (e.g., during loading screens or before a combat sequence). This prevents mid-burst pop-in on lower-end devices.
Patterns
- Continuous ambient (fire, smoke, rain): Rate + Lifetime + Size tuned so density looks right at normal camera distances.
- One-shot bursts (explosion, impact, muzzle flash): Set Rate low or 0, then call emitter:Emit(num) from an animation marker or event.
- Attached effects (foot dust, weapon trail, aura): Parent emitter or its attachment to the moving part/bone. Use LockedToPart or VelocityInheritance as appropriate.
- Wind-reactive: Enable global wind in the environment, set Drag > 0 and WindAffectsDrag = true on the emitter.
- Combined with animation: Marker "FootStep" → find foot Attachment → Emit or play a short one-shot emitter.
See the references/ folder (particle-emitter-properties.md, shapes-flipbooks-and-advanced.md) for the exhaustive property reference, visual examples, optimization checklists, and concrete code for common effects (integration covered in SKILL and cross-skill notes).
Related effects (often used alongside particles)
- Beam: textured ribbon between two Attachments (lasers, energy, ropes). Key properties:
Texture,TextureMode/TextureLength/TextureSpeed,Color,Transparency(NumberSequence along the beam),Width0/Width1,CurveSize0/CurveSize1,FaceCamera,LightEmission,LightInfluence,ZOffset. - Trail: ribbon left behind two Attachments as their parent part moves (sword trails, projectile paths, after-images). Key properties:
Color,Transparency,Texture,TextureMode,TextureLength,MinLength,MaxLength,WidthScale,LightEmission,LightInfluence,FaceCamera,Lifetime. - Highlight: cheap, effective outlines (selection, targeting, "powered up"). Has both an outline and a solid interior fill (
FillColor/FillTransparency,OutlineColor/OutlineTransparency).DepthModecontrols whether the highlight is visible through walls (AlwaysOnTop) or only when not occluded (Occluded). There is a client-side cap of 255 simultaneousHighlightinstances (disabled instances still count toward the cap). - PointLight / SpotLight / SurfaceLight + Atmosphere + PostProcessing for overall mood that makes particles read correctly.
Cleanup for transient emitters
- Always destroy cloned one-shot emitters after their maximum lifetime (
Debris:AddItemortask.delay). Do not leave disabled emitter instances accumulating in the workspace. - For attached continuous emitters, set
Enabled = falseand:Clear()before reparenting or destroying to avoid orphaned particles. - When pooling emitters, reset Rate, Lifetime, Size, and Transparency to known defaults before reuse so stale state does not leak into the next burst.
Scripts
scripts/EffectBurst.lua: clone-and-destroy helper for one-shot particle bursts. Clones every ParticleEmitter under a template Attachment/BasePart, emits a burst locally, and schedules cleanup after the maximum lifetime. Safe for continuous emitters because the original emitters are never mutated.
Reference index
- particle-emitter-properties.md: Tune particle appearance, motion, emission, or rendering cost.
- shapes-flipbooks-and-advanced.md: Configure emitter shapes, animated textures, bursts, or distance culling.
Files (roblox-suite)
-
references
-
particle-emitter-properties.md 7.2 KB
--- read_when: "Tune particle appearance, motion, emission, or rendering cost" last_reviewed: 2026-06-17 --- # Particle emitter properties reference **Main source:** https://create.roblox.com/docs/en-us/effects/particle-emitters ## Emission control - **Enabled**: Master switch. Setting false stops new particles but existing ones continue. Use :Clear() to instantly remove active particles. - **Rate**: Particles per second (capped ~400 on desktop, ~100 on mobile per emitter). Lower rate + clever lifetime/size is usually better than high rate. - **Speed**: Initial velocity range (studs per second). Negative values emit backward. Does not affect already spawned particles. - **SpreadAngle**: Vector2 (X, Y) deviation in degrees from EmissionDirection. - **Lifetime**: Seconds or NumberRange (random per particle). Hard capped internally at 20 seconds. - **EmissionDirection**: Only relevant when parented to a BasePart (which face emits from). When parented to an Attachment, rotate the Attachment to aim emission; EmissionDirection is ignored. ## Visual appearance - **Texture**: The image each particle uses. PNG with transparency is ideal. For grayscale textures, set LightEmission = 1 to make dark areas invisible. - **Color**: ColorSequence. Even a constant Color3 in Studio is stored as a one-keypoint ColorSequence. Keypoints define the gradient over particle lifetime. - **Size**: NumberSequence. Use envelopes (the pink lines in the sequence editor) for per-particle random variation. - **Transparency**: Use a NumberSequence to fade particles toward the end of life, and optionally at birth, to prevent popping. - **Squash**: NumberSequence for non-uniform scaling (positive = tall & skinny, negative = wide & flat). Useful for stylized effects. - **Orientation**: - FacingCamera (default billboard quad) - FacingCameraWorldUp (billboard but locked to world Y) - VelocityParallel / VelocityPerpendicular (aligns with movement; great for streaks and sparks) - **LightEmission**: 0 = normal alpha blend, 1 = additive (glowing effect even in darkness). - **LightInfluence**: 0 = completely unaffected by world lighting, 1 = fully lit by environment. - **Brightness**: Scales the light the emitter contributes when `LightInfluence` is 0. No effect when `LightInfluence` is 1. - **ZOffset**: Moves the render layer forward/back in studs without changing 3D position. Useful for layering multiple emitters. ## Shape system - **Shape**: Box, Sphere, Cylinder, Disc. - **ShapeStyle**: Volume (emit inside the volume) or Surface (emit on the boundary). - **ShapeInOut**: Inward, Outward, or InAndOut. - **ShapePartial**: Modifies the shape. Cylinder: multiplies the radius on the emission-direction side. Disc: inner-radius proportion (`0` = fully closed disc, `1` = emission only on the outermost rim; larger hole as the value increases). Sphere: hemispherical angle (`1` = full sphere, `0.5` = half-dome, `0` = point). **Important parenting note**: Sphere and Cylinder shapes do **not** display correctly when the emitter is parented only to an Attachment. Only use them with a BasePart parent (the part can be tiny and invisible). ## Motion over lifetime - **Acceleration**: Constant velocity change per second (Vector3). Primary way to simulate gravity (0, -9.81 or lower, 0). - **Drag**: How quickly particles lose speed (half-life style). Higher = quicker slowdown. - **WindAffectsDrag**: When true and global wind is enabled in the experience, particles are pushed by the wind vector (requires Drag > 0). - **VelocityInheritance**: 0-1 factor of how much of the parent's current velocity is given to new particles. - **LockedToPart**: Particles stay attached to the emitter's current world position as it moves (like a trail of smoke from a moving object). - **TimeScale**: 0-1 speed multiplier for this emitter's particle effect (useful for per-effect slow-motion or speed-up without changing all other numbers). - **Rotation** and **RotSpeed**: Initial angle and angular velocity (degrees or ranges). Negative = counter-clockwise. ## Flipbook animation (texture sheets) For animated particles (fire loops, explosions, magic bursts): - Prepare a texture atlas with consistent grid (2x2, 4x4, 8x8, or Custom via FlipbookSizeX/Y). Leave margin between frames. - **FlipbookLayout** - **FlipbookFramerate** (or NumberRange for variation, max 30 fps) - **FlipbookMode**: Loop, OneShot (plays the sheet exactly once over the particle Lifetime and ignores `FlipbookFramerate`), PingPong, Random (with blending). - **FlipbookStartRandom**: Start each particle at a random frame instead of frame 0. - **FlipbookBlendFrames**: Crossfade between adjacent frames for smoother Loop/OneShot/PingPong playback. Flipbooks cost more memory. Reuse the same atlas across multiple emitters when possible. ## Other notable properties - **LockedToPart** + **VelocityInheritance** control how attached weapon effects or vehicle exhaust follow their source. - **Clear()** method: Instantly removes all currently active particles from this emitter. - **Emit(numParticles)**: Forces a burst of particles regardless of Rate (very useful for one-shot effects triggered by code or animation markers). ## Replication and client authoritative emission - Continuous emitters replicate their state, and each client simulates its own particles locally. The server does not send individual particles. - For one-shot bursts, prefer client-authoritative emission: the server signals that an effect happened, and each client spawns the burst locally. This avoids network chatter and respects per-client quality settings. - Use `RemoteEvent:FireClient` or local event systems; keep gameplay logic authoritative on the server. ## LOD and distance culling - Disable or reduce emitters when the camera is far away. Typical cutoffs: 100–300 studs for disable, half Rate at half distance. - Use `workspace.CurrentCamera` distance checks, tag-based heartbeat systems, or spatial partitions. Avoid per-frame `Magnitude` for many emitters. - Preload textures with `ContentProvider:PreloadAsync` for flipbook atlases and prominent effect textures before they are needed (loading screens, before combat). ## Overdraw and fill-rate measurement - The main GPU cost of particles is fill rate: how many transparent pixels overlap on screen. - In Studio, use **View → Stats → GPU → Fill Rate** and **Render → Overdraw** to visualize cost. Optimize Size and Transparency before Rate. ## Cleanup for transient emitters - Destroy one-shot clones after their maximum lifetime via `Debris:AddItem` or `task.delay`. Do not let disabled emitters accumulate. - For continuous emitters, set `Enabled = false` and call `:Clear()` before reparenting or destroying. - When pooling, reset Rate, Lifetime, Size, Transparency, and Color to default values before reuse. ## Property interaction notes Many properties only affect particles at the moment they are emitted. Changing Acceleration after particles exist will affect them, but changing Speed will not. Transparency and Size sequences are evaluated over the particle's individual lifetime (0 to 1 normalized). For best results, combine a low-to-medium Rate with a good Transparency fade, Size growth or shrink, and Color shift. See the performance reference for how these choices impact GPU cost. -
shapes-flipbooks-and-advanced.md 5.1 KB
--- read_when: "Configure emitter shapes, animated textures, bursts, or distance culling" last_reviewed: 2026-06-17 --- # Shapes, flipbooks, and advanced particle techniques ## Emitter shapes The Shape properties give you enormous control over where and how particles are born. **Shape** (enum): - Box: Simple axis-aligned box. - Sphere: Spherical volume. - Cylinder: Cylindrical volume. - Disc: Flat circular disc. **ShapeStyle**: - Volume: Particles born anywhere inside the shape. - Surface: Only on the outer surface of the shape. **ShapeInOut**: - Outward (default for many effects) - Inward - InAndOut (random mix) **ShapePartial** (0-1): - For Cylinder: multiplies the radius on the EmissionDirection side. - For Disc: specifies the inner-radius proportion. `0` = fully closed disc, `1` = emission only on the outermost rim (larger hole as the value increases). - For Sphere: hemispherical angle. `1` = full sphere, `0.5` = half-dome, `0` = point. **Important parenting note**: Sphere and Cylinder shapes do **not** display correctly when the emitter is parented directly to an Attachment. Only use them with a BasePart parent (the part can be tiny and invisible). ## Flipbook best practices Flipbooks turn a single texture into an animated sprite per particle. Creation tips: - Use power-of-two dimensions when possible. - Leave clear transparent margins between frames (at least several pixels) because of mipmapping. - Common layouts: 4x4 (16 frames), 8x8 (64 frames). - For OneShot explosions, make the animation self-contained and time the framerate to the particle Lifetime. Runtime tips: - OneShot mode ignores `FlipbookFramerate` and plays the sheet exactly once over the particle Lifetime; time the Lifetime to the animation. Excellent for impact bursts and explosions. - Random mode with low or zero framerate creates organic variation (different embers in a fire, slightly different spark shapes). - Combine FlipbookStartRandom = true with framerate = 0 for "static but varied" particles (leaves, debris). - Enable FlipbookBlendFrames to crossfade frames in Loop/OneShot/PingPong modes for smoother playback. Memory cost is higher than static textures. Prefer reusing a small number of high-quality flipbook atlases across your experience. Preload flipbook atlases and large effect textures with `ContentProvider:PreloadAsync` before they appear on screen to avoid pop-in on lower-end devices. ## Advanced motion techniques - **Acceleration + Drag + Wind**: The classic way to make convincing smoke, leaves, or snow that reacts to global wind. - **VelocityInheritance + LockedToPart**: Perfect for exhaust, auras, or "particles stuck to a moving character". - **TimeScale**: Great for per-emitter slow-motion effects or speeding up a rain storm without touching every property. - **Orientation = VelocityParallel**: Turns particles into streaks (good for fast motion, rain, lasers). ## Attachment orientation - When a ParticleEmitter is parented to an Attachment, `EmissionDirection` is ignored. - Aim particles by rotating the Attachment (use `Attachment.WorldCFrame` or parent it to a part and rotate the part). - This is the preferred way to control direction for weapon muzzles, foot dust, and directional bursts. ## One-shot vs continuous emission Continuous (Rate > 0): Good for ambient effects (campfire, rain, magic aura). One-shot: ```lua emitter.Rate = 0 emitter:Emit(30) -- or a random range ``` Trigger from: - Animation markers (best) - Touched events - Ability activation - Explosion logic You can also temporarily raise Rate for a short time and then lower it again, but Emit() is cleaner for discrete bursts. ## Combining multiple emitters Most professional effects use 2-5 emitters parented to the same Attachment or Part: - Core flame (bright, fast, high LightEmission) - Smoke (slower, higher Lifetime, different Color/Transparency) - Sparks (high Speed, short Lifetime, VelocityParallel orientation) - Glow / light source (very large Size, high Transparency, additive) Layer them with different ZOffset values when needed. ## Client-authoritative replication - For one-shot bursts, fire a remote or local event to tell clients *that* the effect happened, then let each client spawn its own particles. - This avoids replicating particle timing over the network and lets low-end clients skip or simplify effects. ## LOD and distance culling - Disable emitters beyond 100–300 studs; reduce Rate at half that distance. - Use a tagged heartbeat or spatial partition instead of per-frame distance checks for many emitters. - Only spawn ambient weather/crowd emitters in the near-camera region. ## Cleanup for transient emitters - Destroy one-shot clones after their maximum lifetime. Use `Debris:AddItem` or a `task.delay` tied to the emitter's `Lifetime.Max`. - Set `Enabled = false` and `:Clear()` before reparenting or destroying continuous emitters. - Reset pooled emitters to default Rate/Lifetime/Size/Transparency/Color before reuse. ## Script example: controlled burst emitter See `scripts/EffectBurst.lua` for a clone-and-destroy helper that emits from every ParticleEmitter under a template Attachment or BasePart and schedules cleanup automatically.
-
-
scripts
-
EffectBurst.lua 3.6 KB · in bundle
-
-
SKILL.md 9.1 KB
--- name: roblox-vfx description: "Build or optimize Roblox particles, beams, trails, and highlights. Use for emitter shapes, flipbooks, one-shot bursts, animation-marker effects, distance culling, and overdraw." last_reviewed: 2026-06-17 --- # roblox-vfx **Main source:** https://create.roblox.com/docs/en-us/effects/particle-emitters + the Effects section of the docs and the ParticleEmitter class reference. Tune particle lifetime, size, transparency, and rate together. Profile overlapping transparent effects on the lowest target device. For marker-triggered bursts, read [roblox-animation](../roblox-animation/SKILL.md). For UI particles, read [roblox-user-interfaces](../roblox-user-interfaces/SKILL.md); ParticleEmitters do not render inside ViewportFrame. ## Core creation and parenting - Parent ParticleEmitter to a BasePart (emission fills bounds or chosen EmissionDirection face) **or** (strongly preferred for control) to an Attachment. - Rotate the parent or the attachment to steer emission. EmissionDirection is ignored when parented to an Attachment; rotate the Attachment itself to aim particles. - EmissionDirection only matters when parented to a part. ## Tune particle appearance 1. Texture (prefer .png with alpha; grayscale + LightEmission=1 to hide dark areas). 2. Color (ColorSequence; even a single Color3 in Studio is stored as a one-keypoint ColorSequence; use it for gradients over lifetime). 3. Size (NumberSequence, often with envelope for natural variation). **Warning:** Large sizes = high GPU fill-rate cost. 4. Transparency (NumberSequence). Fade particles in or out to avoid popping. 5. Lifetime (or NumberRange for per-particle random). 6. Rate (particles per second; hard caps ~400 desktop / 100 mobile per emitter; keep low and achieve density with other properties). Then motion (Speed at birth, SpreadAngle, Acceleration for gravity/wind, Drag + WindAffectsDrag when global wind is enabled, VelocityInheritance, LockedToPart, TimeScale). ## Emitter shapes Shape = Box / Sphere / Cylinder / Disc. - ShapeStyle = Volume (everywhere inside) or Surface (only the skin). - ShapeInOut = Inward / Outward / InAndOut. - ShapePartial further modulates the shape. Cylinder: radius on the emission side. Disc: inner-radius proportion (`0` = fully closed disc, `1` = emission only on the outer rim). Sphere: hemispherical angle (`1` = full sphere, `0.5` = half-dome, `0` = point). Sphere/Cylinder shapes do **not** display correctly when the emitter is parented to an Attachment. Only use them with a BasePart parent (the part can be tiny and invisible). ## Flipbooks (animated textures over particle life) Prepare a grid sheet (2x2, 4x4, 8x8, Custom) with transparent spacing between frames (to prevent mip filtering from sampling adjacent frames). - FlipbookLayout, FlipbookSizeX/Y. - FlipbookFramerate (or random range, max 30). - FlipbookMode: Loop, OneShot (explosions; ignores `FlipbookFramerate` and plays exactly once over the particle Lifetime), PingPong, Random (with crossfade; great for organic variation). - FlipbookBlendFrames: crossfade between adjacent frames in Loop/OneShot/PingPong for smoother animation. - FlipbookStartRandom: each particle starts at a random frame (useful when framerate is 0 for static but varied look). **Memory warning:** Flipbooks are heavier. Reuse textures, keep resolution reasonable, limit unique animated emitters on low-memory clients (older phones will auto-disable flipbooks). ## Lighting and rendering controls - LightEmission: 0 normal, 1 additive/glow (works even in dark scenes). - LightInfluence: 0 = ignore world light, 1 = fully affected. - Brightness: scales the light the emitter contributes when `LightInfluence` is 0. No effect when `LightInfluence` is 1. - Orientation: FacingCamera (classic billboard), FacingCameraWorldUp, VelocityParallel, VelocityPerpendicular. - ZOffset: render layer offset in studs (layer multiple emitters without moving them in 3D). ## Performance across devices - Fill rate (pixels covered by overlapping transparent layers) and overdraw are the main GPU costs. - Rate × Size × average opacity × how many overlap on screen = cost. - Always test at both lowest and highest Studio Editor Quality Level. - Mobile rate is capped lower. - Use .Enabled = false to pause (existing particles continue until they die or you call :Clear()). - Many simultaneous high-rate/large/transparent emitters will cause the engine to throttle or drop effects on low-end clients. - Measure overdraw in Studio with **View → Stats → GPU → Fill Rate** and **Render → Overdraw**. Reduce total opaque pixel area before lowering Rate. ## Replication and client-authoritative emission - ParticleEmitter state replicates, but individual particles do not. A server-owned emitter will spawn the same particles on every client automatically. - For one-shot bursts, prefer **client-authoritative emission**: the server signals an event, each affected client spawns the burst locally. This avoids network replication of per-burst timing and respects each client's quality settings. - Use `RemoteEvent:FireClient` or a local signal so clients own transient visuals; keep gameplay logic authoritative on the server. ## LOD and distance culling - Stop or reduce expensive emitters when the camera is far away. Common thresholds: disable at 100–300 studs, reduce Rate by half at half-distance. - Use `workspace.CurrentCamera` distance checks or zone systems. Avoid per-frame `Magnitude` checks for many emitters; instead use a tagged culling heartbeat or spatial partition. - For ambient weather/large crowds, spawn emitters only in the near-camera region rather than globally. ## Preloading textures - Call `ContentProvider:PreloadAsync({texture})` for flipbook atlases and prominent effect textures before they are needed (e.g., during loading screens or before a combat sequence). This prevents mid-burst pop-in on lower-end devices. ## Patterns - Continuous ambient (fire, smoke, rain): Rate + Lifetime + Size tuned so density looks right at normal camera distances. - One-shot bursts (explosion, impact, muzzle flash): Set Rate low or 0, then call emitter:Emit(num) from an animation marker or event. - Attached effects (foot dust, weapon trail, aura): Parent emitter or its attachment to the moving part/bone. Use LockedToPart or VelocityInheritance as appropriate. - Wind-reactive: Enable global wind in the environment, set Drag > 0 and WindAffectsDrag = true on the emitter. - Combined with animation: Marker "FootStep" → find foot Attachment → Emit or play a short one-shot emitter. See the references/ folder (particle-emitter-properties.md, shapes-flipbooks-and-advanced.md) for the exhaustive property reference, visual examples, optimization checklists, and concrete code for common effects (integration covered in SKILL and cross-skill notes). ## Related effects (often used alongside particles) - Beam: textured ribbon between two Attachments (lasers, energy, ropes). Key properties: `Texture`, `TextureMode`/`TextureLength`/`TextureSpeed`, `Color`, `Transparency` (NumberSequence along the beam), `Width0`/`Width1`, `CurveSize0`/`CurveSize1`, `FaceCamera`, `LightEmission`, `LightInfluence`, `ZOffset`. - Trail: ribbon left behind two Attachments as their parent part moves (sword trails, projectile paths, after-images). Key properties: `Color`, `Transparency`, `Texture`, `TextureMode`, `TextureLength`, `MinLength`, `MaxLength`, `WidthScale`, `LightEmission`, `LightInfluence`, `FaceCamera`, `Lifetime`. - Highlight: cheap, effective outlines (selection, targeting, "powered up"). Has both an outline and a solid interior fill (`FillColor`/`FillTransparency`, `OutlineColor`/`OutlineTransparency`). `DepthMode` controls whether the highlight is visible through walls (`AlwaysOnTop`) or only when not occluded (`Occluded`). There is a client-side cap of 255 simultaneous `Highlight` instances (disabled instances still count toward the cap). - PointLight / SpotLight / SurfaceLight + Atmosphere + PostProcessing for overall mood that makes particles read correctly. ## Cleanup for transient emitters - Always destroy cloned one-shot emitters after their maximum lifetime (`Debris:AddItem` or `task.delay`). Do not leave disabled emitter instances accumulating in the workspace. - For attached continuous emitters, set `Enabled = false` and `:Clear()` before reparenting or destroying to avoid orphaned particles. - When pooling emitters, reset Rate, Lifetime, Size, and Transparency to known defaults before reuse so stale state does not leak into the next burst. ## Scripts - `scripts/EffectBurst.lua`: clone-and-destroy helper for one-shot particle bursts. Clones every ParticleEmitter under a template Attachment/BasePart, emits a burst locally, and schedules cleanup after the maximum lifetime. Safe for continuous emitters because the original emitters are never mutated. <!-- catalog:references:start --> ## Reference index - [particle-emitter-properties.md](references/particle-emitter-properties.md): Tune particle appearance, motion, emission, or rendering cost. - [shapes-flipbooks-and-advanced.md](references/shapes-flipbooks-and-advanced.md): Configure emitter shapes, animated textures, bursts, or distance culling. <!-- catalog:references:end -->
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.