Unity Script Reference:
RigidbodyConstraints.FreezeRotationZ
Description

Freeze rotation along the Z-axis.