I wrote this script to follow the player, but it just moves upward forever.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class follow : MonoBehaviour
{
public GameObject Player;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Vector3 Location = Player.transform.position;
transform.Translate(Location*Time.deltaTime);
Debug.Log(Location * Time.deltaTime);
}
}