how do you use freezeposition?

I am trying to make an enemy freezeposition when he collides with the player. How do i use it though? I tried


and RigidbodyConstraints.FreezeAll = true;

but neither work. How are they used?

It's an enum... `rigidbody.constraints = RigidbodyConstraints.FreezeAll;`

Try disabling Rigidbody, using the following script:

` var nameOfVariable : NameOfScript = TargetOject.GetComponent(Rigidbody); nameOfVariable.enabled = false; `

` var freezePosition : FreezePosition = enemy.GetComponent(Rigidbody); freezePosition.enabled = false; `