Rotating a Part Using Radians

Rotating a Part Using Radians

Mar 30 2021, 5:24 AM PST


You want to rotate a part in radians.


Use the CFrame.Angles function and multiply it by the CFrame position.

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


To get a rotated CFrame we take the position and multiply it by an Angle component. We get this by calling the CFrame.Angles function. Here we just want to rotate the part, so we want the same position so we just use part.CFrame and multiply it by CFrame.Angles(0, math.pi, 0). We’re rotating in radians here on the Y-axis by math.pi which is equal to 180 degrees.

  • math
  • rotate
  • movement