What do you need to know to make a weapon?

Good morning, in this post I want to ask for advice on how to make a weapon since I will be making my first weapon and I do not have much knowledge of what to use, I guess I should use Raycasting but more of that I do not know … I would like to be told that Things I need to know to make a good weapon.:grin:

Psdt: I have the weapon built

Thanks!:smiling_face_with_three_hearts:

5 Likes

Let’s list it up:

  • Method of firing projectiles - rays or physical projectiles
  • Method of dealing damage
  • Server or client-side, preferably server

Mapping the base:

  • Client fires the gun.
  • Server checks if it can fire or not depending on tool’s parent, player’s health etc.
  • Server either fires a projectile/ray after condition is met or does something else.

CAUTION! Physical projectiles will lag if not done correctly. FastCast is an option of firing the projectiles.

6 Likes

Of what?

2 Likes

The method of dealing damage/verifying the hit of the projectile/ray.

3 Likes

Here’s how to do a first person shooter (apart from the gun shooting.) To me this part is more difficult than actually making the gun shoot… I am not sure why. The First Person Element Of A First Person Shooter

Also if this is your first weapon you’re ever making, keep it simple. Do a simple 3rd person gun or use the tutorial I sent for a good first person.

Since it’s your first gun you just use a simple raycast. When a player clicks, have it tell the server to shoot. (You can keep track of ammo and all that.) The server will run checks to see if they can shoot, as in are they even alive or other checks you can think of. Then it will tell all clients to replicate the shot as in all clients make the bullet with a local script. Deal damage and all of that on the server, but make the bullet on the client, like the part itself.

3 Likes

The hardest thing is projectiles. A lot of people(including me) do this in varying ways. Ray casts, body velocity and tweens just to name a few.

Other than that, the following should be taken into heavy consideration:
Model - A blend between quality and performance. You don’t want to make it too complex. Keep part count at a minimum.

Animation - Smooth not rigid, immersive at best.

Effects - Surprisingly, this is always tossed in the back. Effects are powerful. It can turn your ideological brick to a realistic machine gun. Sounds, colors, particles. Anything that is visually appealing. Sound offers depth.

Goodluck!

1 Like