How to 'Hide' an object from Line Trace after picking it up? (C++ code)

The reason I was doing it like this (btw I am only a beginner and also was just making this for fun rather than adding it into actual game) but the reason for this, was that I want the user to be able to place down the objects again at a later time.