Skip to main content

EffectCreate

Description

Creates a visual effect at the specified location.

This function is typically used to spawn environmental effects such as fire, lightning, smoke, or sparks. The effect is tied to the current script and will be automatically removed when the script ends.

function EffectCreate(effectName, x, y, z) --[[ ... ]] end

Parameters

  • effectName : string – The name of the effect to be created (e.g., "GymFire", "ElectrocuteLRG", "ToiletExplode").
  • x: number – The X coordinate where the effect will be created.
  • y: number – The Y coordinate where the effect will be created.
  • z: number – The Z coordinate where the effect will be created.

Return Values

  • effect: string - The name of the effect you want to create

Example

Create a fire effect in Jimmy's room

local fire = EffectCreate("GymFire", -490.65, 313.77, 31.40)