How do i raycast effectively?

Hello,

I am just going to let you know that there is a module that many people use named FastCast. You do not need to switch over to this module but its there for if you need it:

It is built for making FPS type games. It has bullet drops, bullet velocity, less lag, more efficient. It is used for guns and it inserts parts into the workspace. You can customize these parts for if you have a different gun that shoots out different objects. There are many benefits to this module.

There is a tutorial on YouTube that shows you how to implement it as well: