Parenting Objects

Hey i was wondering if someone can show me in java script a code that when you click on a object it will parent you with that specific object! so if i clicked on a object it will follow me around!

Here, here and here.

Unity answers is made to help people with very specific questions. Try to do some stuff on your own, very simple stuff, like write something on the debug log if you click on a game object. Separate your problem to several very simple problems. And if you have an issue concerning one of theses problems, you can ask the question hereā€¦