Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Custom Types
Copy Markdown
Open in ChatGPT
Open in Claude
Orbit does not use types like Vector3D or ImColor in the traditional sense. You cannot access a Vector3D element using the following code.
local function Function()
local Vector = Vector3D(1.0, 1.0, 1.0)
Print(tostring(Vector.x)) --this will give you an error
end
Orbit stores these types in arrays instead. Be sure to remember that tables start with an index of 1 in LUA, unlike other programming languages.
local function Function()
local Vector = Vector3D(1.0, 1.0, 1.0)
Print(tostring(Vector[1])) --this will give you the value x
end
The elements of a Vector2D type are ints.
local Vector = Vector2D(1, 1)
Print(tostring(Vector[1])) --X value
Print(tostring(Vector[2])) --Y value
The elements of a Vector3D type are floats.
local Vector = Vector3D(1.0, 1.0, 1.0)
Print(tostring(Vector[1])) --X value
Print(tostring(Vector[2])) --Y value
Print(tostring(Vector[3])) --Z value
The elements of a Color type are ints.
local White = Color(255, 255, 255, 255)
Print(tostring(White[1])) --Red value
Print(tostring(White[2])) --Green value
Print(tostring(White[3])) --Blue value
Print(tostring(White[4])) --Alpha value
Last updated on
Was this page helpful?
Next to read:
Driver Callsnull
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message