Position a Part at its Origin

Position a Part at its Origin

Jun 14 2019, 4:46 PM PST

You want to position a part at the origin using its CFrame.

Set a part’s CFrame property to a new CFrame value.

local part = Instance.new('Part')
part.Parent = Workspace
part.Anchored = true
part.CFrame = CFrame.new(0, 0, 0)

Here we set part.CFrame to a new CFrame with the position (0, 0, 0) which is the origin. An alternative method to create the same CFrame value would be as follows.

part.CFrame = CFrame.new(Vector3.new(0, 0, 0))
  • movement