How can I detect which face of a cube was hit by line trace?

You think that may be the easiest way? just seems like alot of hoops for what its doing