How to make projectiles fire using raycast?

Hey there! First of all, thank you a lot for trying to help. it means a lot.

I’m pretty new with raycasting and I was wondering how to make a projectile fire using it? Like for example: a gun shoots and a raycast will be done on the point where you aimed with ur mouse and let a projectile (a bullet) follow that raycast until he hit a humanoid.