Powerlang Docs
  • Welcome!
  • Beginner's Guide
    • Syntax
    • Directives
    • Environment
    • Special types
    • Functions
    • Tables
    • Loops
    • Conditions
    • Events
    • Libraries
    • Comments and Flags
  • Creating a Game
    • Project Introduction: Potato Rush
    • Creating the main game loop
    • Creating potatoes
    • Keeping track of score
  • Libraries
    • Special Types
      • BrickColor
      • CFrame
      • Color3
      • Instance
      • NumberRange
      • UDim2
      • Vector2
      • Vector3
    • Services
      • DataStore
      • Debris
      • Mouse
      • Pathfinding
      • PhysicsService
      • Players
      • Ray
      • TweenService
    • compiler
    • math
    • os
    • string
    • table
    • retrostudio
  • Advanced Information
    • Instance Functions
    • Global Functions
    • Multithreading
    • Compiler Library
Powered by GitBook
On this page
  1. Libraries
  2. Services

Debris

The Debris service allows you to automatically delete Instance objects after a specified amount of time without blocking the thread.

Function

Description

AddItem(Object: Instance, Time: number): nil

Adds an object to the Debris service, which automatically removes the object after a specified amount of time. Requires 2 arguments: Object (an instance to be added) and Time (a number representing the time in seconds before the object is removed).

PreviousDataStoreNextMouse

Last updated 7 months ago