Having trouble with cloning with prefabs

Alright, so I’m trying to make it so that when you press a button it will spawn a placeable object that you can move around but there are a few problems. 1. When pressing the button it will spawn a tree that you can move around with just moving your mouse but if it interacts with other trees it will unselect and not be usable 2. If you press left click, the normal key to spawn a tree, you will stop moving it and it will go on a random number on the x-axis and disappear So that is the problem, and the weird thing is, I never told the clone to do any of this, its like it has a mind of its own. So any help would be great.

My code

http://pastie.org/p/6Bb6cprN08Oas3LV9f17aL

Hi,

I don’t know if I have well understand your problem but it seems to me that you have made a prefabs of the tree with his behavior (1&2 with pressing buttons).

If you create a prefabs it’s like you create a real clone with the same behavior so it’s clearly totally normal that the “clone” which come to the first tree prefabs acts like the first tree.

Maybe you can just unselect the script in charge of the 1&2 behavior in your clone if you don’t want this behavior ? Or create a prefabs with just the appearance ?

Hope it helps you !