Gun projectile with raycast hitbox

i always wanted to make my gun system have an expandable hitbox for projectile-type so i went to devforum and search for “box cast”, “sphere cast” or “raycast thickness” and only a few results were found. although they were cool concepts for roblox but there were no proper ways to do. so i dug deeper until i found two threads:

these threads made my mind come up an idea so i ended up using their way to create my stuff. and here’s the result:

this is prototype so expect an annoying bug. also, feedbacks are welcome here