How to shorten/extend an object?

Hello, it is possible to shorten and extend an object (in my case is a simple box) but only one side of it? I don’t want to scale it because it will extend on both side of the axis…
I want to do this by code.
Thank you

Update the position by half of your scaling ammount eg:

function scaleCube(scaleAmmount){

//Scale the object on X axis in local units
transform.localScale.x += scaleAmmount;

//Move the object on X axis in local units
transform.localPosition += scaleAmmount/2;

}

So it’s a workaround, not a real “resize one side”?