how to add target ai

Im making a fps game and i need a script tht travels toward my player. nothin else. it will probs be simple but im a noob. thanks

*You could use NavMeshAgent if you have unity pro.

*If not, you could find some assets in the asset store that would do the trick.

*If you really don’t want to spend money, then for flat surfaces I would recommend transform.position = Vector3.Slerp(transform.position, destination.position, Time.deltaTime)

*If your terrain is not flat… then use physics. Add a rigidbody to your gameObject and apply a force towards your target