Custom Types
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
Was this page helpful?