Skip to main content

Text.Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent)

Clones the object original and returns the clone.

Parameters:

NameTypeDescription
originalObjectAn existing object that you want to make a copy of.
positionVector3Position for the new object.
rotationQuaternionOrientation of the new object.
parentTransformParent that will be assigned to the new object.

Returns:

typeDescription
ObjectThe instantiated clone.

Usage

---@type Object
local original;

---@type Vector3
local position;

---@type Quaternion
local rotation;

---@type Transform
local parent;


local val0 = Text:Instantiate(original, position, rotation, parent)