Help with Projectiles

How do I make a projectile spawn at a certain point and go in the direction of the mouse, but not stop as soon as it hits the mouse, so basically how do I make gun?

There’s been a lot of topics similar to this. Use the search feature to look it up.