Duplicate an object if is at a position

I have to duplicate an 2D Rigidbody if it’s at a specific position. How can i do it? I must use 2D Vector or 3D?

Thank to all in advance.

if (transform.position == targetPosition) {
GameObject newObj = new this.gameObject;
Instantiate (newObj, transform.position, Quaternion.identity);
}

Alternatively, you can set it inside a trigger placed wherever your target position is.

I use this code, but it doesn’t work:

using UnityEngine;
using System.Collections;

public class Duplicate : MonoBehaviour {

	public Rigidbody2D ballrigid;

	public GameObject ball;

	public Vector3 target;
	public Vector3 start;
	private Vector3 position;

	public Quaternion rotation;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		position = new Vector3 (0, transform.position.y, transform.position.z);

		if (Input.GetKeyDown(KeyCode.A)){
			Instantiate (ball, start, rotation);
		}
	
	}
}