[SOLVED ]Instantiate prefab position

Hello, I am stuck.
My script was used to transport an item to the player holder location.

Since I made the player in Prefab as well as the said object, the object in question takes the starting position rather than the updated position of the player.

Can someone please help me?

    public GameObject player;
    GameObject holder;
    private bool isStick = false;
    Rigidbody2D rb;
    private bool isStoping = false;
    Vector2 holderPosition;

    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
        holder = player.transform.Find("holder").gameObject;

    }

    private void Update()
    {
        holder = player.transform.Find("holder").gameObject;
        holderPosition = new Vector2(holder.transform.position.x, holder.transform.position.y);
    }

    private void FixedUpdate()
    {
        if (isStick == true && PlayerController.grabMode == true && PlayerController.carrying == 1)
        {
            transform.position = holderPosition;
            rb.velocity = new Vector3(0, 0, 0);
            rb.velocity = Vector2.zero;
            GetComponent<CapsuleCollider2D>().enabled = false;
            PlayerController.isCarrying = true;
        }

A public reference to your player prefab is useless here. Instead you should find your instantiated player object in your start method with something like GameObject.Find(“Player”) (or something more performant). There is no way to find the instance of your player object with a reference to its prefab.
**
If GameObject.Find is too inefficient for you, I can help brainstorm some more efficient ways to get the reference to your instantiated player object.

Hi,
@unity_ek98vnTRplGj8Q thank you!

The sentence: “There is no way to find the instance of your player object with a reference to its prefab” helped me a lot since i wasn’t able to figure it out…

GameObject.Find(“Player”) just worked like a charm.

Your help is really appreciated, thanks again!