How do I create a gun the shoots straight,checks collision, and applies damage?

i want to make a gun. that being said, how do i make it shoot out a straight line and check for collision and apply damage?

I would suggest you look at the Shooter Example that is downloadable from the marketplace. It’s a multiplier FPS with everything you need.

Frankly, someone explaining the process of creating a weapon system to you would require explaining several other things that you would need to know how to do first… it would take many pages of text.