How do you tranform multiple objects

Just started doing this

public GameObject[] sprite;

public void Slider_Changed (float newValue){
	Vector2 pos = sprite.transform.position;
	pos.x = newValue;
	sprite.transform.position = pos;
}

}

This should do it:

public GameObject[] sprite;
public void Slider_Changed (float newValue)
{
	foreach(GameObject obj in sprite)
	{
    	Vector2 pos = obj.transform.position;
    	pos.x = newValue;
		obj.transform.position = pos;
	}
 }