Skip to main content

EffectPlayer

Allows you to play visual effects created by standard visual effect plugins. This supports playing:

  • ParticleEmitters
  • Sounds
  • Tween and bezier animations
  • ModuleScripts
  • Beams
  • Trails

Functions

PlayEffect

EffectPlayer.PlayEffect(
BinInstance,--

The bin of effect objects or a single effect object to play.

IgnoreAllDescendantsboolean?--

If true, will not play effects on descendants of the bin. Defaults to false.

) → number--

The total duration of the effect as a number.

Plays a visual effect, returning the total duration of the effect as a number.

Show raw api
{
    "functions": [
        {
            "name": "PlayEffect",
            "desc": "Plays a visual effect, returning the total duration of the effect as a number.",
            "params": [
                {
                    "name": "Bin",
                    "desc": "The bin of effect objects or a single effect object to play.",
                    "lua_type": "Instance"
                },
                {
                    "name": "IgnoreAllDescendants",
                    "desc": "If true, will not play effects on descendants of the bin. Defaults to false.",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "The total duration of the effect as a number.",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 349,
                "path": "src/Packages/EffectPlayer/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "EffectPlayer",
    "desc": "Allows you to play visual effects created by standard visual effect plugins. This supports playing:\n* ParticleEmitters\n* Sounds\n* Tween and bezier animations\n* ModuleScripts\n* Beams\n* Trails",
    "source": {
        "line": 12,
        "path": "src/Packages/EffectPlayer/init.luau"
    }
}