problem with 2d scrolling background using offset texture

Hi,
I’m making a 2D racing game using offset textures but having a problem making the background resume scrolling after stopping.

The problem is since Time.time is always running, when the car stops and then later resumes, the background starts scrolling based on the offset of current time

using UnityEngine;
using System.Collections;

public class OffsetScroller : MonoBehaviour
{
// public float scrollSpeed;
private Vector2 SavedOffset;
private Vector2 offset;
public float scrollSpeed;
private GameObject obj3;
private float carspeed;
public Transform target2;

private float y;

// Use this for initialization
void Start ()
{
SavedOffset = renderer.sharedMaterial.GetTextureOffset (“_MainTex”);
obj3 = GameObject.Find (“Car”);
}

void Update ()
{

carspeed = obj3.GetComponent ().speed;

if (target2.position.y > -2.5)
if (carspeed > 0) {
y = Mathf.Repeat (Time.time * scrollSpeed, 1);
offset = new Vector2 (SavedOffset.x, y);
renderer.sharedMaterial.SetTextureOffset (“_MainTex”, offset);
}
}

void OnDisable ()
{
renderer.sharedMaterial.SetTextureOffset (“_MainTex”, SavedOffset);

}
}

after a good nights sleep I figured out the solution is to simply not use Time.time
Instead I just created another float called A. ie A* scrollspeed and incriment A by 0.01 every update…