using UnityEngine;
using System.Collections;
public class scrollSpeed : MonoBehaviour {
scrollSpeed;
// Use this for initialization
void Start () {
transform.Translate (new Vector3 (-1, 0, 0) * Time.deltaTime * scrollSpeed);
}
// Update is called once per frame
void Update () {
}
}
As other have pointed out:
You have an unspecified variable that has the same name as the class on line 5. Change the variable name and specify it’s type.
public class scrollSpeed : MonoBehaviour {
float speed = 1f;
// Use this for initialization
void Start () {
transform.Translate (new Vector3(-1, 0, 0) * Time.deltaTime * speed);
}
}