RaycastHit resets to 0,0,0

i asked this question before, but people didn’t seem to understand it, so i tried to update it, but it refused to work, so i remade it.

Hey guys, i have a problem var Money : int = 1000;var test = 0;var test2 = 0;var spawn1 = 0;var pre - Pastebin.com if you look at this code, line 26, i try to create an object at the position of the object i selected + x 2. But what happens here is that the location defaults to 0,0,0 + 2,0,0 instead of making the location at the selected object + 2,0,0. How do i fix this?

Have you made doubly sure that your raycast is hitting something? It looks like your spawn code is called regardless.