---
title: Datatypes
nav_order: 7
---

# Datatypes

## Vector3

```lua
Vector3.new(x?, y?, z?)
Vector3.zero / one / xAxis / yAxis / zAxis

v.X v.Y v.Z
v.Magnitude
v.Unit
v:Dot(other)
v:Cross(other)
v:Lerp(other, t)
-- + - * / unary- ==
```

## Vector2

```lua
Vector2.new(x?, y?)
v.X v.Y
v.Magnitude
-- + - * /
```

## Color3

```lua
Color3.new(r, g, b)           -- 0..1
Color3.fromRGB(r, g, b)       -- 0..255
c.R c.G c.B
c:ToRGB()                     -- three integers
```

## CFrame

```lua
CFrame.new()
CFrame.new(x, y, z)
CFrame.new(vector3)

cf.Position / cf.p / cf.X / cf.Y / cf.Z
cf.LookVector / RightVector / UpVector
cf * vector3                  -- rotate+translate point
```

Identity rotation only for constructors above. No full Roblox CFrame API (angles, ToEulerAngles, etc.). No BasePart CFrame write yet.
