SlashCo Wiki

Player:AddEffect

  Player:AddEffect( string effectName, number duration )

Description

Applies an effect to the player for the given duration, calling its EFFECT.OnApplied callback (and EFFECT.OnExpired first if the effect wasn't already active and doesn't handle EFFECT.OnRemoved).
Once the duration ends, the effect expires automatically unless another instance of the same effect is still active.

Arguments

1string effectName

Name of a registered effect.

2number duration

Seconds until the effect expires.