PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

Instance

Instance

Constructors

Instance.new ( string className, Instance parent )

Creates an new object of type val. The parent argument is optional; If it is supplied, the object will be parented to that object.

Performance note: When the Instance/Parent|Parent of an object is set, Roblox begins listening to a variety of different property changes for replication, rendering and physics. Therefore, it is recommended to set the Parent property last when creating new objects. As such, you should avoid using the second argument (parent) of this function. You can read this thread on the developer forum for more information.