For some reason i do not like the pin behavior.what works for me every time is to create an imagepoint for your sprite where you want the other object to "pin" and then use
every tick----- set position to another object imagepoint whatever you want.
do not use this code underneath "on start of layout" just use it normaly as an condition.
and do not forget to go to the second layout properties and assign as an event sheet,
the event sheet you have.i believe that is the reason that it does not pin.