Show 3d text after collision

hello guys and girls,

i’m currently in the process fo writing a shoot em up on unity, but am having trouble getting a 3d text to appear within my function ontrigger. I’m using particles aswell, maybe that is the problem.

here’s my code for the collision between bullet and enemy.

 function OnTriggerEnter(otherObject: Collider){

    if(otherObject.gameObject.tag == "enemy1"){

	playerScript.playerScore +=100;
	
	otherObject.gameObject.transform.position.y =7;
	
	otherObject.gameObject.transform.position.x = Random.Range(-6,6);
	
	var tempExplosion: Transform;
	
	tempExplosion = Instantiate(explosion,transform.position, transform.rotation);
	
	Destroy(gameObject);

Any ideas?

Thank you

You could add a 3D Text in your under your enemy and disable it. in the collision you could then have.

otherObject.gameObject.BroadcastMessage("Activate");

on the enemy you need the:

var 3Dtext;


function Activate(){
3Dtext.enabled = true;
}

This would need tweaking but I think you get the idea?

That might just do it, i’ll try it ou ad get back to you