Need help on where to start with making a Third Person Gun System

Hello, I am very interested in making a gun for my game. To be honest I haven’t come across any good tutorials on making guns (Third Person). They mostly just skim over on what they are doing then present the end result.

Also take note that I’m talking about a Third Person Shooter, not First Person. There are good FPS tutorials but I’m looking to make a Third Person Shooter System.

Here is a reference video on what I’m talking about.
https://gyazo.com/970c742699441df32dc8549e449574ff

I was thinking of making a gun very similar to the one in the reference video.

I’ve been doing code a a decent amount of time but I have no idea where to start when it comes to scripting the gun(I can build it). I’d really appreciate if someone could help me out on where to start and shoot me some good tutorials or what ever is out there.

3 Likes

Take a look at this post which might help you in making your own third person gun system

3 Likes

Well first you need to plan out what you want in the gun system
Here are some questions to ask your self.

  • What mechanics do you want? ex: blood, scope
  • How should the weapon maintain client-server communication?
  • How should your gun handle raycasting? Through the server, or through the client? What are the drawbacks and pros of each? (security v. performance)
  • How should the guns be initialized into the gun system?
  • How excessive/minimal should recoil be so that it deters perfect aim but also allows people to actually shoot with the gun?
  • How should the gun detect how much ammo there is?
  • How should the gun reload?
  • What types of guns should there be, and how would you handle the different types?
  • How should your gun system allow for customization?
  • How should your gun system combat cheaters?
  • How should you balance out damage/cooldown across weapons?

You also need to know what is required of making a gun system

  • Animations (tedious)
  • Sounds
  • Effects
  • UI
  • Extensive scripting
2 Likes

Well, I can do Animations, Sounds, Effects, and UI. Those aren’t a problem.

What are ALL the required skills and knowledge needed for making a gun? ( a good gun)

1 Like

The reason most tutorials just “skim” over what they’re doing is because it’s tedious to explain every actual step in the process.

Making a “good” gun takes a lot of scripting knowledge. If you’re not already somewhat advanced, I highly suggest making a simpler gun first.

Since the question is for a “good” gun, then:

First you’ll need a working TPS camera system. Either you just force Shift-Lock on everyone, or you need to know how to manipulate CFrames and update it every time the mouse moves - you might also need to adapt to whatever device the player’s using like mobile or console if you plan to include those. Bonus work if you want fancy stuff like view bobbing, sway, etc.

Next is player input and state management for both the character and the gun. When the player presses the fire button (input), you need to first check if they can do that based on:

  • Is the player currently sprinting?
  • Is the gun currently being reloaded?
  • Does the gun have at least one bullet ready to fire?
    Then you fire the gun:
  • Get the direction of aim
  • Add some spread to that
  • Fire the bullet
  • Play firing animation
  • Play sounds
  • Play VFX
  • Update ammo remaining
  • Update any state changes (stop sprinting, stop aiming down sights, etc)
    Then you handle the hits:
  • Apply hit effects depending on what’s hit
  • Verify hit validity using server-sided checks
  • Deal damage if a valid target was found

You also need to handle reloading, automatic weapons that just keep firing, shotguns, etc.

I personally feel that the amount of knowledge required to make proper guns is highly underestimated, a lot of people focus on the visuals and effects. I’m not downplaying the amount of work for that either, but there’s a reason pre-made weapon frameworks already exist - it’s a lot of work if you want a decent one.

4 Likes

Wow, that’s a lot to handle.

Okay then. What about a simple gun? I would need to start somewhere right?

3 Likes

Honestly I find that hard to answer, the simplest I’ve ever “made” a gun was taking one from free models and lightly editing it :sweat_smile::sweat_smile::sweat_smile: at least that’s where I started, it would help you understand how these systems work. Apologies if I caused you to be intimidated with gun systems. It sounds complicated, and in a way, it is, but it’s just because of the amount of moving parts so to speak. Once you understand how the whole thing works, every step is actually pretty simple.

This would be the literal “simplest” gun tutorial I’ve found, it’s just a point and click gun.

Here you begin to add some effects, at least for this tutorial it was just muzzle flash.

Going further, this tutorial shows animations being played. You’re now being introduced to states, and how you should handle each “state” - like carrying, shooting, etc.

Beyond that, you might notice that those guns don’t really have bullet travel time or bullet drop, or actual bullets at all. From this point I’d recommend anything about guns from B Ricey, starting from here. He goes more in depth about other gun-related stuff, and if you’re confused about anything he does (like OOP) he has tutorials for that too.

Happy learning!

2 Likes

Thank you so much!! I’ll look into it!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.