2D Sprite won't change position

Hi,

I have a script which simulates a 2D sprite being relocated to a position using a Vector2. The sprite moves upward until it hits a preset Vector2 coordinate. After which, it is re-positioned at the initial starting position.

This process is started by taking Keyboard input (Input.GetKeyDown(KeyCode.Space)).

However, after a single run of the whole process, the 2D sprite won’t move from the initial spawn point if I hit space another time. I just can’t see the error and I need another pair of eyes to spot it (probably straight away :)).

You can find a pastebin version of the single script here.
You can see a video of my problem here.

I can upload the script file if needed :slight_smile:
Thanks.

// Sorry if this is in the wrong section. It’s the first time I’ve posted here

Do you have any physics components attached to your sprite? If so depending how you have things setup you might need to position your sprite through those components instead of using the transform directly.