How to get make part not inside of wall after raycast

i am making a drag system but
the raycast puts the the cylinder inside the wall

i am trying to make it look like this when you drag the part in studios

You could either try offsetting the position using the size of the model or use Shapecasting instead of Raycasting.

Shapecasting Documentation

i tried shapcasting, but apparently it doesn’t work property since im doing raycast from the camera instead a set direction

do you see this why is it freaking out?