delete effect||doc135475

September 20, 2022

Format

 Entity:delEffect(name, smooth) 
  • The class to which the function belongs:Entity

Description

Removes effects from solid objects.


Parameters

Variable name type Description
name string Name, the name when adding the effect
smooth boolean Whether the gradient disappears, if it is false, the special effect disappears immediately


Code Samples

on the object clientmount script, add an effect, and remove the effect after 1 second

this:addEffect('testEffect',"asset/Effect/Life/88_foot.effect") 
World.Timer(20,function()
    this:delEffect('testEffect', false) 
end)