Yuari
Documentation
Docs/Data types/CFrame.new

CFrame.new

Creates a CFrame from a Vector3, three numbers, or empty for identity.

Syntax

CFrame.new(position?: any) -> CFrame

Parameters

ParameterTypeDescription
position?anyThe position value used by the call.

Returns

TypeDescription
CFrameThe returned CFrame.

Description

CFrame.new is part of the Data types library. Vector and CFrame values are VM userdata with operator overloads; operations return new value objects.

Each call creates or returns a fresh object or value that you can store and pass to other functions.

Example

local cf = CFrame.new(Vector3.new(0, 5, 0))
print(cf.Position)

Notes

  • Vector and CFrame operations return new value objects.