Open Asterune
Instance

Instance

Creates instances of concrete classes.

See Instance for the associated instance class.

Behavior

Instance.new creates an instance from a creatable class name. Unknown class names produce an error. Services and abstract classes cannot be created this way. See the class index.

New instances are unparented. Configure properties before setting Parent.

Fields

new

new

Instance.new(className, parent?) creates a creatable class and optionally assigns its Parent. Abstract classes and services cannot be created through this constructor.

Example

Luau
local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace