the Instantiation wont do its job

I want to make a Galaga style game and i follow a tutorial for it but even though i did exactly as explained i my code still wont instantiate a new player prefab. I however do not get a message that i have something wrong except for when my player gets detroyed then it tells me i do not have a prefeb attached while i have dons so. can i have something wrong in my code :

var player : GameObject;

function Start () {

function Update () {

         if ((gameObject.tag == "Player") == null){
		           Instantiate(player, Vector3(0.0,3), Quaternion.identity);



i do not know what to do or should i start from scratch again

That doesn’t really make sense. I think you need to change

if ((gameObject.tag == "Player") == null)


if (GameObject.FindWithTag("Player") == null)

What this does is check if there are any game objects with the tag of “Player”. This means you player prefab should have Player as a tag assigned.