Garry's Mod Wiki

Entity:SetLayerAutokill

  Entity:SetLayerAutokill( number layerID, boolean autoKill )

Description

Sets the autokill flag on the layer, making the layer be automatically removed once the animation playback finishes.

This function only works on BaseAnimatingOverlay entites!

Arguments

1 number layerID
The layer ID to change.
2 boolean autoKill
Whether to set or unset the autokill flag.