Disable movement on collision and re-enable

Hello guys!
I searched similar posts but I could not find the solution.
I want to temporarily disable the movement of my game object (GO) when a collision occurs and then reenable it. I am moving the GO using a controller and forces. My script is the following:

public class PauseMovement : MonoBehaviour {

	public GameObject go;
	public float movementSpeed = 0.05f;
	public float movementPauseDelay= 10.0f;
	float currentDelay = 0.0f;
	public float force = 0.5f;
	private bool movable;
	public Rigidbody rb;

	void Start()
	{
		rb = GetComponent<Rigidbody> ();
	}

	void Awake()
	{
		movable = true;
	}

	//Move object using keyboard and forces
	void Update()
	{
		if (movable = true) {

// keyboard
			if (Input.GetKey (KeyCode.RightArrow)) {rb.AddForce (transform.right * force);}
			if (Input.GetKey (KeyCode.LeftArrow)) {rb.AddForce (transform.right * -force);}
			if (Input.GetKey (KeyCode.UpArrow)) {rb.AddForce (transform.up * force);}
			if (Input.GetKey (KeyCode.DownArrow)) {rb.AddForce (transform.up * -force);}
			if (Input.GetKey (KeyCode.W)) {rb.AddForce (transform.forward * force);}
			if (Input.GetKey (KeyCode.S)) {rb.AddForce (transform.forward * -force);}

//XBOX controller

			// left joystick
			if (Input.GetAxis ("LeftJoystickX") < 0) {rb.AddForce (transform.right * -force);}
			if (Input.GetAxis ("LeftJoystickX") > 0) {rb.AddForce (transform.right * force);}
			if (Input.GetAxis ("LeftJoystickY") < 0) {rb.AddForce (transform.forward * force);}
			if (Input.GetAxis ("LeftJoystickY") > 0) {rb.AddForce (transform.forward * -force);}
				
// buttons
			if (Input.GetButtonDown ("Y")){rb.AddForce (transform.up * 10 * force);}
			if (Input.GetButtonDown ("A")) {rb.AddForce (transform.up * 10 * -force);}
		}
	}

	// when a collision takes place stop the movement for movementPauseDelay
	void OnTriggerEnter ()
	{
		currentDelay = Time.time + movementPauseDelay;

		//freeze briefly GO
		if (Time.time > currentDelay)
		{
			rb.isKinematic = false;
			movable = true;
		} 
		else 
		{
			rb.isKinematic = true;
			rb.velocity = Vector3.zero;
			movable = false;
		}
	}
}

After the collision, my GO indeed stops moving. However, even after movementPauseDelay has passed, all movement remains disabled. Any ideas on how to re-enable the movement?

Thanks in advance,
Michael

You should use Coroutines for delayed executions.

bool isRunning = false;

void OnTriggerEnter ()
{
	if(isRunning) StopCoroutine("ReenableMovement");
	rb.isKinematic = true;
	rb.velocity = Vector3.zero;
	movable = false;
	StartCoroutine("ReenableMovement");
}

IEnumerator ReenableMovement()
{
	isRunning = true;
	yield return new WaitForSeconds(10);
	rb.isKinematic = false;
	movable = true;
	isRunning = false;
}

The ‘isRunning’ boolean is implemented for dealing with collisions while the coroutine is running, however it is very unlikely that the character will collide with something again while the movement is disabled. If you don’t need it, you can remove it from the script.