Horizontal Scrolling Background

using UnityEngine;

//This script controls the scrolling of the background
public class Background : MonoBehaviour
{
	public float speed = 0.1f;			//Speed of the scrolling
	
	void Update ()
	{
		//Keep looping between 0 and 1
		float x = Mathf.Repeat (Time.time * speed, 1);
		//Create the offset
		Vector2 offset = new Vector3 (0, x);
		//Apply the offset to the material
		GetComponent<Renderer>().sharedMaterial.SetTextureOffset ("_MainTex", offset);
	}
}

This allows my background to scroll vertically, but I’m trying to make it scroll horizontal. I tried changing the vectors, but it didn’t do anything. Any help?

When I have changed this:

 Vector2 offset = new Vector3 (0, x);

To this:

 Vector2 offset = new Vector3 (x, 0);

It started scroll from vertical to horizontal…

Ayooo this helped me a lot for a 2d flight sim im making thx!