CFrame

A coordinate frame: a position and a rotation together.

Think of it as A map pin with an arrow on it.

CFrame.new(x, y, z) is a position, CFrame.Angles builds a rotation in radians, CFrame.lookAt faces a target, and cf * offset turns an offset in the CFrame's own frame into a world position. Multiplication order matters.

Where the picture breaks

A pin's arrow points one way on a flat map, but a CFrame rotates in all three dimensions, and multiplying CFrames in a different order gives a different result.

A CFrame stores a position and a 3 by 3 rotation matrix. Multiplying composes them: a * b applies b in a's frame. The order matters because rotations do not commute.

See it with the rest of the analogy cast

Official reference: create.roblox.com

Related terms