Instantiate at raycast position

Hi, if anyone could tell me how i could instantiate a object at the position of where a raycast hits. any help would be gladly appreciated.

Add a RaycastHit to you raycast. You will then be able to get the position where the ray hit something or the transform that it hit etc. About RaycastHit.

Example:

var hit:RaycastHit;
if(Physics.Raycast(origin, direction, hit)){
	instantiatedObject.transform.position = hit.point; 
}