I have a sphere with a follow player script assigned. In the scene it is there, but when I click play it disappears from the scene and from the game. Here is the script:
using UnityEngine;
using System.Collections;
public class cameramovement1 : MonoBehaviour {
public GameObject player;
private Vector3 offset;
// Use this for initialization
void Start () {
offset = transform.position;
}
// Update is called once per frame
void LateUpdate () {
transform.position = player.transform.position + offset;
}
}
please help.