Is there a way to stop a gameobject using transform.translate, instead of using its rigidbody velocity?

Hello, I was wondering if there is any way to stop a sprite from moving using transform.translate, because working with rigidbody velocity is proving challenging. For Example, if the sprite enters a collision and is being moved is there a way to stop it without using velocity? I have already tried transform.translate(0,0,0) and it doesn’t work.

Well I figured it out. All I needed was boolean to say whether or not my character should move, and then added that condition to my movement if statements.