You want to raycast/detect stuff infront? Well this is the perfect module for you! copy everything besides the flag stuff and then just add the raycast block. CONTROLS Mouse - aim Space - Shoot raycast
This is only a prototype but it works! If you want to use it as a rifle change the wait to a lot lower and it will raycast faster but it might not work the best