Pick up object scripts, goes through walls

Hey guys, i have this script where you can grab objects and swing them around, but when pick it up then it gets ‘‘invisible’’ to the walls so the cube goes through the walls when i point towards the walls with the cube.
I hope you understand what i mean,
Im not that great at english.

try to implement the colliders to the objects and might your problem got solved…