NullReferenceException - Array of Transforms?

hello to all, sorry for my english, it is terrible, i know. I’m a very newbie with unity, and i’m making an android game.
My problem is on my shooting script, i’ve isn’t even finished him yet and i’m already getting errors D=

Here is my code:

using UnityEngine;
using System.Collections;

public class ShooterBehaviour : MonoBehaviour {


	public Transform Bullet;
	public int bulletNumber;
	public float fireRate;
	public float currentRate;
	Transform[] bulletList;

	void Start () {
		Transform[] bulletList = new Transform [bulletNumber];
		for (int i = 0; i < bulletNumber; i++){
			bulletList *= Instantiate (Bullet, transform.position, transform.rotation) as Transform;*
  •  }*
    
  • }*

  • void Update () {*

  •  if(Input.GetKeyDown("space")){*
    
  •  	Debug.Log("was pressed!");*
    
  •  	Debug.Log("its time to fire!");*
    
  •  	bulletList[1].gameObject.SetActive(true);*
    
  •  }*
    
  • }*
    }
    When i press the space bar, i was supposed to fire the first bullet from my array, but instead, i get one nullReferenceException. Does anyone can help me?

Your bug is on this line 14:

   Transform[] bulletList = new Transform [bulletNumber];

You declare ‘bulletList’ on line 8. Because you use ‘Transform’ at the start of line 14, you declare a local variable of the same name. This local variable hides the variable at the top of the file, so you never initialize the ‘bulletList’ that is used on line 24. The fix is to remove ‘Transform’ from the start of Line 14:

   bulletList = new Transform [bulletNumber];