How to make the left side shrink when reducing the size of the sprite

Godot Version

godot 4.3 ver

Question

get_parent().get_node("Sprite").size.y -= 1
With this code, it will be smaller based on the top.
Sprite-0005

but, i want like this:
Sprite-0005
I want to make it smaller based on the bottom.

Hi.
What’s “size.y”? Do you mean scale?

I assume you unchecked “centered” in the sprite inspector. Try to offset the y coord to minus the height of the texture in pixels.

you have to increase the y position simultaniously.

so when size.y -=1, you have to do position.y +=1