vector(my.scale_x, my.scale_y, my.scale_z) This creates a temporary vector wich will be deleteted after the command. If this vector is edited of course nothing will happen.
vec_set(my.scale_x,vector(0.5 ,0.5 ,0.5 ) ); This works because my.scale_x is a pointer to the my.scale_x,y,z-vector here.