public void KnockDown(float impulse) { Debug.Log("Knocked down."); rigid.constraints = RigidbodyConstraints.None; knockedDown = true; knockdownTimer = knockdownTime * impulse; if (knockdownTimer > 3f) { knockdownTimer = 3f; } if (holding != null) { holding.GetComponent <Rigidbody>().isKinematic = false; holding.transform.parent = transform.parent; if (holding.tag == "Player") { FriendController otherPlayer = holding.GetComponent <FriendController>(); otherPlayer.pickedUp = false; otherPlayer.Standup(); } holding = null; } }