How do i make a cube invisible and make it so you can't walk through it?
Disable the renderer.
create a cube and insure it has a box collider or some such applied to it. Then uncheck it's Mesh renderer in the inspector. Your geometry will be invisible but collisions applied to it will remain. The object will still be visible and able to be selected via the hierarchy.