Ray hit object

Hello, i work on a tds game and i have some problems.
I want to shoot a ray from camera to the scene and get the hit point, but i dont know exactly how to do that. I use if(Phisycs.Raycast(ray,hit,1000)) and then i say to my player to lookAt hit.point, what i do wrong?

Ups i forgot a layer mask :P,thx for all followers