Unstable Jump force

Hi guys, So I have I have 2-D game in which my character is moving up wards but must collide first with a certain gameObject to continuously move upwards. However I noticed that sometimes my character moving upward awkwardly (propels from left or somtimes right). How can I fix that? and can you also please explain to me why is that happening?

Here is my code for the function that I’m currently using:

 void OnTriggerEnter2D(Collider2D target) {
    if (target.tag == "NormalPush")
    {
      myBody.velocity = new Vector2(myBody.velocity.x, normal_Push); // normal_Push value = 5
    }

    if (target.tag == "ExtraPush")
    {
     myBody.velocity = new Vector2(myBody.velocity.y, extra_Push); // extra_Push value is 10
    }
}

Part of the problem could be that it’s also taking into account your horizontal velocity when you walk into the object. Instead of using the body’s x velocity, try using a set value.

Also, did you mean to use myBody.velocity.y for the extra push or should that be ‘x’?