How to make a gun

I was wondering how I would go about making a gun system where the gun bullet shoots straight ahead from the barrel, not where the mouse is. I’m not that familiar with scripting guns at all so.

I would start to learn a little bit of scripting so you have a little bit of knockledge before going off and just copying code into your game without knowing a single thing. Also I would recommend using FastCast. They have an API explaining what Fastcast is and how to use and and why:

Heya! I’m not a scripter by any means but one way if you are starting out is to use YouTube, that will be one of your best friends on your scripting journey! You could also use what @AustnBlox has provided above!

Note that this is for asking for help with scripts you’ve made that doesn’t seem to be working out. Now if you need help scripting something that you’ve done little to no progress with you should hire a scripter. There are many places for this but you can try out GRP.


You should raycast a line directly from the barrel (so you are going to need to write a function where it calculates where it is going to touch the point the person shot at). Or you use FastCast, as AustnBlox also mentioned

This is not true, you can also ask about how you would go about making a script. You can’t always have code beforehand if you don’t even know how to start in the first place. :melting_face:

Oh, sorry mate. Just heard someone say that so I just assumed that is how it is