Category
Types
Vector2, Vector3 and Color3, plus colour helpers.
Pages in this category
What these types are
Vector2, Vector3 and Color3 are ordinary tables with a metatable. That has a few consequences:
typeof(Vector3.new())returns"table".- You can read and write fields like
v.X, but because the table is a normal table, you can also change a vector in place. - Anywhere a function takes a position, a plain table such as
{x = 1, y = 2, z = 3}or{1, 2, 3}is accepted too.
Luau also has its own vector library (when the runtime provides it). It is separate from Vector3.