I am attempting to get a game object to follow another game object and keep getting this error i am not sure what this error means.
using UnityEngine;
using System.Collections;
public class Follower_Movement : Player
{
public bool aFollower = true;
public GameObject player = GameObject.Find("Player");
Vector3 behindPlayer = new Vector3(0, 0, -1);
// Use this for initialization
void Start()
{
Transform playerTransform = player.transform;
Vector3 followerPosition = playerTransform.position;
}
// Update is called once per frame
void Update ()
{
if (aFollower == true)
{
followerPosition = followerPosition - behindPlayer;
}
}
}