Hi all. please help past fixed script
Error
NullReferenceException
UnityEngine.Transform.get_position () (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/UnityEngineTransform.cs:19)
PriesoAI.Update () (at Assets/skriptai/PriesoAI.cs:26)
sript
using UnityEngine;
using System.Collections;
public class PriesoAI : MonoBehaviour {
public Transform taikinys;
public int judesiogreitis;
public int rotationgreitis;
private Transform myTransform;
void budrus(){
myTransform = transform;
}
// Use this for initialization
void Start () {
GameObject go = GameObject.FindGameObjectWithTag(“Player”);
taikinys = go.transform;
}
// Update is called once per frame
void Update () {
Debug.DrawLine(taikinys.position, myTransform.position, Color.yellow);
//ziureti i taikini
myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(taikinys.position - myTransform.position), rotationgreitis * Time.deltaTime);
}
}