Hello, I’m working in a 2D game and what I’m trying to do is very simple I guess, but I can’t solve by myself: “When the player click in a object, create a clone and put the clone at X, Y and change his size. AND if the player click on the other object (a green background) destroy the clone.”

Can someone help me on this, please? Thanks for your attention!

I see you need at least 2 scripts one for each object the original and the clone

original would have
void OnMouseDown(){// called when the object is clicked on

Instantiate ( a GameObject variable,  a Vector3 for position , Quaternion.identity );
}

as for the clone use the same method but this time call Destroy()

void OnMouseDown(){
Destroy(gameObject);
}