Why does my lineRenderer endpoint end at single point in space....

I’m making a space shooter game (super original…I know) this is a 3d game that utilizes the linerenderer to shoot objects coming toward the camera. The line renderer is attached to empty game object which is facing forward. The line should shoot forward and the line should end forward in z space to a point thats relative to the position of the game object. Rather than doing that it shooting to a single point in space (forward of the game object) so its shooting in the correct direction but its not ending at proper spot. Ive attached an illustration of whats happening, these are illustrated in top and the right view point so you can see what is happening: Heres the code for the lineRenderer:

	public float weaponRange = 0f;
	public Transform gunEnd;

	private LineRenderer laserLine;

	void Start () 
		laserLine = gameObject.GetComponent <LineRenderer>();

	void Update ()
		if (Input.GetButtonDown ("Fire1")) 
		laserLine.enabled = true;
		laserLine.SetPosition (0, gunEnd.position);

		laserLine.SetPosition (1, (gunEnd.transform.forward * weaponRange));

		    if (Input.GetButtonUp ("Fire1"))
			laserLine.enabled = false;



Disabled “Use world space” and changed

laserLine.SetPosition (0, gunEnd.transform.Position);


laserLine.SetPosition (0, gunEnd.transform.localPosition);

this resolved the orientation issue