Rigidbody on player becomes shaky on collision

I’m having problems with my character’s Rigidbody. Basically I have two scripts both are which attached to the player, the first script is my player movement script which also have a Addforce bounce variable with it and the second script is a disabling script which disable my player movement script for two seconds so my bounce variable can work. As mention above my I’m having problems with the Rigidbody attach to my player. When my player collides with an object that is set to trigger, my players movement gets really weird and shaky from the direction of where the object came from, until the player collides with another box collider then it goes back to normal!!! How would I stop this from occurring? Here are all three scripts. Thank you:

Disabling script:

using UnityEngine;

using System.Collections;

public class Disablingscript : MonoBehaviour {

public Playermovement playerMovementRef;

void Start ()
{
	StartCoroutine("DisableScript");
}

IEnumerator DisableScript ()
{
	playerMovementRef.enabled = false;
	
	yield return new WaitForSeconds(2f);
	
	playerMovementRef.enabled = true;
      }
  }

Player movement script:

 using UnityEngine;

 using System.Collections;

 public class Playermovement : MonoBehaviour {

 public float speed = 15f;
 private Vector3 target;



void Start () {
	target = transform.position;
}

void Update () {
	if (Input.GetMouseButtonDown (0)) {
		target = Camera.main.ScreenToWorldPoint (Input.mousePosition);
		target.z = transform.position.z;
	}			
		transform.position = Vector3.MoveTowards (transform.position, target, speed * Time.deltaTime);
}

void OnTriggerEnter2D(Collider2D other) 
{
	if (other.tag == "Bouncy object")
	
	GetComponent<Rigidbody2D>().AddForce(transform.right * 500);
     }
  }

/* somewhere */
transform.position = Vector3.MoveTowards (transform.position, target, speed * Time.deltaTime);

/* elsewhere */
GetComponent<Rigidbody2D>().AddForce(transform.right * 500);

How would I stop this from occurring?

Don’t mix modiying transform and rigidbody for motion. If your game uses physics to drive motion, move your character with forces instead. Physics engine will update rigidbodys position and then you will just overwrite the position calculated by the physics engine so your character is kinda like walking in two directions at once.

AddForce applies acceleration, meaning your object maintains a velocity (that may dissipate due to friction and drag, but still, it applies motion over several frames/seconds at least). Setting transform.position just totally ignores what physics is doing and both of them update the position in different directions.

All movement should use the rigidbody unless you know what you are doing.

/* Awake */
rb = GetComponent<Rigidbody2D>();

/* FixedUpdate */
// No idea if this is still valid, but it's a start.
rb.AddForce(Vector3.MoveTowards (rb.position, target, speed * Time.deltaTime)); 

/* elsewhere */
rb.AddForce(transform.right * 500);

Adjust the code to feel right as it’s no longer applying velocity but rather acceleration.