Having issues with align orientation

this sometimes goes 90 degrees from the second argument. so it doesn’t face that direction. i’m wondering if it could be because i’m enabling the align orientation afterwards but to me that doesnt make much sense… any ideas are appreciated.

 local alignAtt = rootPart:FindFirstChild("AlignAttachment")
    alignAtt.CFrame = CFrame.new(rootPart.Position, workspace:FindFirstChild("CenterPart").Position)

    local alignOri = rootPart:FindFirstChild("AlignOrientation")
    alignOri.Enabled = true