Im really new to programming. Right now, im tryint to get a cube to chase my player, but I keep getting errors and idk why. Please help. Here is my code:
using UnityEngine; using System.Collections;
public class CubeChase : MonoBehaviour {
var leader : Trasnform;
var follower : Transform;
var speed : float = 5;
function Update()
{
follower.LookAt (leader);
follower.Translate (speed * Vector3.forward * Time.deltaTime);
}
}
and here are the errors: (7,20) unexpected symbol ‘:’ (7,31) unexpected symbol ‘;’ (8,33) unexpected symbol ‘;’ (9,19) unexpected symbol ‘:’ (9,27) unexpected symbol ‘=’
Should be an easy fix I imagine, Thank for your time ![]()