Debris

extends Instance

Class fields

FieldXML typeValue
NamestringDebris
ExplorerOrderstring-1
ExplorerImageIndexstring30
summarystringA service that provides utility in cleaning up objects

Properties

1
MaxItems
int
FieldXML typeValue
NamestringMaxItems
Deprecatedbooltrue
summarystringDeprecated. No replacement

Functions

3
AddItem
(item: Instance, lifetime: double = …) → void
FieldXML typeValue
NamestringAddItem
summarystringAdds an Instance into the debris service that will later be destroyed. Second argument 'lifetime' is optional and specifies how long (in seconds) to wait before destroying the item. If no time is specified then the item added will automatically be destroyed in 10 seconds.
SetLegacyMaxItems
(enabled: bool) → void
FieldXML typeValue
NamestringSetLegacyMaxItems
addItem
(item: Instance, lifetime: double = …) → void
FieldXML typeValue
NamestringaddItem
Deprecatedbooltrue
summarystringUse AddItem() instead