using UnityEngine;
using System.Collections;
public class finish : MonoBehaviour {
void OnCollisionEnter (Collision col)
{
if(col.gameObject.name == "DeathCube1")
{
gameObject.AddComponent (Ctrl2);
}
}
}
Im trying to add my script Ctrl2 when deathcube1 touches this object