Instance.GetInstanceByID||doc136404

September 20, 2022

Format

Instance.GetInstanceByID(id)

Describe

Get the instance according to the unique ID. As long as the instance exists, it can be obtained in any scene or just in memory.

parameter

Variable name Type Describe
id int Unique ID of the instance

Return value

Type Describe
Instance Instance object

Code example

Get the instance object with ID 1

local ins = Instance.GetInstanceByID(1)