How do I get objects to not bounce?

I tried setting the bounce threshold to a really high number and setting the physics material bounce setting to 0 but all my objects are still bouncing.

Put this code to your objects

#pragma strict

function FixedUpdate()
    {
        var currentVelocity = rigidbody.velocity;
 
        if (currentVelocity.y <= 0f) 
            return;
         
        currentVelocity.y = 0f;
         
        rigidbody.velocity = currentVelocity;
    }

If you dont want them to bounce, then just remove the physics material ‘bounce’ from the object. If you want to do it through code, you can say this

someObject.collider.material=null;