Heya. I’m working on a camera follow code (but not rotate) that I got from another unity answer but I’m experiencing trouble with it.
Here’s the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class camerafollowori (NAME OF SCRIPT) : MonoBehaviour {
var target : Transform;
var distance : Float;
function Update(){
transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z - distance);
}
}
It keeps saying that the two : symbols next to target and distance are wrong.
Thanks for reading!