JS - How do I change the constraints of an object?

I’d like to know how to change the constraints of a gameobject’s rigidbody, in JavaScript.

For example when something of the “Sharp” tag hits this object, I want another object’s Y position constraint to be turned off so that it can fall freely after the hit.

public var lug : GameObject;

function OnTriggerEnter (other : Collider) {

	if(other.tag == "Sharp"){
		lug.rigidbody.Constraints.FreezePositionY;
		Destroy(gameObject);
	}
}

From taking a look at the Rigidbody Scripting API, wouldn’t this work?:

lug.rigidbody.Constraints.FreezePositionY = false;