Can an object's offset values be slowly changed?

void Update () {
mr = stars.GetComponent ();
mat = mr.material;
offset = mat.mainTextureOffset;
offset.y += Time.deltaTime / (x);
offset.x += Time.deltaTime / (y);
mat.mainTextureOffset = offset;

		if (play.activeSelf == false) {
			StartCoroutine (Fall ());

	IEnumerator Fall()
		if (x < 90 && y < 1200) {
			x += 5;
			y += 67;
			yield return new WaitForSeconds (.5f);


I’m using this code to have a scrolling background, however I can’t get it to slowly slow down whenever the coroutine starts, it just immediately goes to the final values of x and y. Can anyone help?

Your “Fall” function you’re using for your coroutine has no sort of looping, the “if” statement and everything inside it will only be run once. I think if you change “if” inside the Fall function to “while” you’ll be closer to what you were going for.