Question by
rOBBIE04 · Sep 17, 2017 at 04:15 PM ·
c#programming
what is wrong with this this script? i am trying to move an enemy foreword. Here is my script.
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class EnemyMovement : MonoBehaviour {
pragma warning disable CS1520 // Method must have a return type
public float speed = 5f; #pragma warning restore CS1520 // Method must have a return type
voidStart () {
}
private void Update() {
transform.Translate(-speed * Time.deltaTime, 0, 0);
}
}
Comment
Answer by PersianKiller · Sep 17, 2017 at 04:36 PM
voidStart () {
}
change it to
void Start () {
}
you forgot to put a space between void and Start.