I'm having an issue with transform.localScale();

I don’t know what I’m doing wrong because I’m trying to make an object smaller in the x and z direction.

var inc : float = 15.0;
transform.localScale += Vector3(-inc, 0, -inc);

(As you can see I’m writing this in javascript, so if you can please answer in javascript.)

-inc = -15, so that is actually scaling up the object (making it bigger just negatively).
The original scale of an object is (1,1,1)
So if you want to scale it down, anything smaller than 1 will work and no need for the negative values, anything that is less than 0 will be equal to the positive value but reversed (the object will be inside out, so don’t do it)

This will subtract 0.4 from the scale

var inc : float = -0.4;
transform.localScale += Vector3(inc, 0, inc);
//Result will be (0.6, 1, 0.6)

This will change the scale to 0.6

var inc : float = 0.6;
transform.localScale = Vector3(inc, 0, inc);
//Result will be (0.6, 1, 0.6)

Also Make sure to change the inc value from the script inspector because it will be set to 15(or any value you set at the beginning and will override the value that you write in the code
You can override it by writing your code in the Start function, that way inc will change to the value of the script.