Please write the code, I will be grateful, I have been suffering for 2 days, it does not work, it doesn’t work, I need your clean code, it will not be big.
Here is my code:
Result 0
using UnityEngine; using System.Collections; public class Atf : MonoBehaviour { public Transform target; public float adrd; public float adrw; void Update () { adrd = Vector3.Distance(transform.position,target.position); if (adrd<30) { adrw +=1 }