Lagging causes skip in code

Im trying to make it so when you leave the area you should be in, it points you back to the origin point, and launches you back in the battlezone. It detects the player leaving and entering with a collider, but the problem is, when the player renters the collider and begins to slow down, the game freezes for the time it takes to cross the area, and unfreezes just before the player crosses it, causing the player to go back and forth. This is the code Im using:

 else if (jumpingBack == "starting") {
			lookPos = target.position - transform.position;
			//lookPos.y = 0;
			rotation = Quaternion.LookRotation (lookPos);
			transform.rotation = Quaternion.Slerp (transform.rotation, rotation, Time.deltaTime * damping);
			if (Vector3.Angle (transform.forward, target.transform.position - transform.position) < 4) {
				jumpingBack = "jumping";
			}
		} else if (jumpingBack == "jumping") {
			rb.AddForce (transform.forward * 10000);
			oldPos = transform.position;
			VelX = rb.velocity.x/20;
			VelY = rb.velocity.y/20;
			VelZ = rb.velocity.z/20;
		} else if (jumpingBack == "ending") {
			
			rb.velocity = new Vector3(rb.velocity.x - VelX, rb.velocity.y - VelY, rb.velocity.z - VelZ);
			if (oldPos == transform.position) {
				jumpingBack = "normal";
			} else {
				oldPos = transform.position;
			}
		}

Jumpingback endingand startingare called in ontriggerenter() and onTriggerExit().
This is called in the update function.

It turned out that my computer was so bad, I couldent properly test it, so I didnt know if my code was messed up or if it was just the lag.
And I fixed my problem.