if(transform.position.y.Equals(0))
{
playerRb.constraints = RigidbodyConstraints.FreezePosition;
if (Input.GetKeyDown(KeyCode.Space))
{
playerRb.constraints = RigidbodyConstraints.None;
playerRb.AddForce(Vector3.up * playerSpeed, ForceMode.Impulse);
}
}