Allowing building only when colliding with another actor

I have a basic building system similar to the one in this video: Basic Building System - Community & Industry Discussion - Unreal Engine Forums. I am new at Unreal Engine, and I couldn’t find any way to make it possible to allow a block to be built only when the preview is touching another object.