Hi. I want that my script add another script to another object but it doesn’t work.
Could you check it. (Sorry for my spelling, I do not know English very well)
using UnityEngine;
using System.Collections;
public class Enter : MonoBehaviour {
public GameObject obiekt2;
void OnTriggerEnter(Collider samochod){
if(samochod.name == "cube" ){
obiekt2.gameObject.GetComponent<skrypt>();
Debug.Log("text");
}
}
}