Instantiating on wrong position? (HELP)

Hi,
I trying to instantiate an object on a particular position but instantiates on a different position.
What’s the problem here?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Instantiator : MonoBehaviour
{
    [SerializeField] GameObject cigarette;
    [SerializeField] Canvas parentCanvas;

    GameObject instantiatedCigarette;
    Vector2 firstCigarettePos;
    float startPosxCig = -946.0901f;
    float startPosyCig = -534.46f;

    private void Start()
    {
        firstCigarettePos = new Vector2(startPosxCig, startPosyCig);
        firstCigarettePos = Camera.main.ScreenToWorldPoint(firstCigarettePos);
    }

    public void InstantiateCigarette()
    {
        StartCoroutine(instantiateCoroutine()); 
    }

    IEnumerator instantiateCoroutine()
    {
        yield return new WaitForSeconds(1f);
        instantiatedCigarette = Instantiate(cigarette, firstCigarettePos, Quaternion.identity , parentCanvas.transform) as GameObject;         
        instantiatedCigarette.transform.SetParent(parentCanvas.transform , false);     
        instantiatedCigarette.transform.position = firstCigarettePos;                  
        instantiatedCigarette.transform.localScale = cigarette.transform.localScale;   
    }

}

Why don’t you print what the value of firstCigarettePos is with Debug.Log() and then see if it is what you expect compared to where that instantiated cigarette goes?

Note: Line 29 sets the position, and line 31 sets it again, which seems a bit redundant.

Ah yes, I see the issue: check over the documentation here:

On line 17/18 you need to use a Vector3 and there is some important information you have to supply in the .z field. Check the docs above for what you need.

Thanks for your reply;
I setted the position in line 31 again just to make sure.
I used transform.localPosition instead of transform.position and problem solved.