How can I change the other objects velocity when using OnTriggerEnter2D?

I want to make my Player to stop after a short delay when entering a zone

rb.angularVelocity =;
rb.velocity =;
float time = Time.time + 1;

where rb is your Rigidbody. of course to set the delay you have to create a float that takes in the current time and add to it, then do a check for Time.time > time to stop.

void OnTriggerEnter2D(Collider2D other) {
StartCoroutine(StopAfterDelay(1, other.gameObject.GetComponent()));

IEnumerator StopAfterDelay(float delay, Rigidbody2D body) {
    yield return new WaitForSeconds(delay);
    body.velocity =;

Wrote it on my phone so sorry if there’s spelling errors. Should give you an idea anyways.