Set Component Location dynamically based on Paper Sprite size

Hi, I’m making a Infinite 2D side scroller game adapting this [tutorial][1], with paper sprites instead of meshes. I want to set a random size for every background block and then set the attach point location at the bottom right boundary of the sprite:

46779-atachpoint.jpg

Here is the construction script for the background block:

It works fine on 1.0 scale. The problem comes when i change the scale of the block in the editor(or in other blueprints), as you can see, the attach point location have some kind of incremental offset:

46782-atachpoint-squash.jpg

46783-atachpoint-stetch.jpg

Any idea on how can I solve that?

I solved it dividing the sprite box extent x by the sprite world scale x:

Now the attach point stays at the bottom right boundary of the sprite even if I change the scale.