EzSword: A Simple, "Drag and Drop", Customizable Sword System

Link to the model at the bottom of the post. Although reading through will help you decide if this is the system for you.

What is EzSword?

EzSword is a simple and pretty much “Drag and Drop” sword system for getting a basic and easy to edit form of melee combat in your game. The idea stems from me getting tired of constantly having to make the same basic melee system anytime I needed a sword in a game. This is meant to fix that by being a simple system that you can just insert into your game, and have it work.

Features
There is a settings module for easy customization of some basic features I added.

  • Obviously you can change Damage and CoolDown in the Settings module.
  • You can toggle Team-Killing through the Settings module.
  • You can toggle if the weapon will have an equip animation or not through the Settings Module.
  • You can change what the Hitbox part is through the Settings Module.
  • You can toggle if the sword will damage NPC’s or not through the Settings Module.
  • You can add as many different swing animations to the Animations folder as you like, the sword will automatically detect these and pick them at random. Just have one if you only want one swing.
  • The sword will also detect multiple different swing sounds and random pick them from the Sounds folder. Just have one if you only want one.
  • Simple Swing and Equip animations saved in the sword for you to load and export as your own if you just need some basic animations to start. Otherwise just add your animations to the Animations folder.
  • The sword will detect the humanoid of whatever you hit regardless of how deep the part you hit is. So no worrying about hitting an accessory part or any other parts you may have added to your Characters.

Things to Note

This system is made to be easy to customize and should work pretty well with most things. There are a few things to be aware of or you should know if you want to edit this a bit deeper.

  • This used .Touched so any bugs or inconsistencies related will be present here.
  • There are comments scattered all over the scripts. If you’re a more advanced programmer and/or have a very special kind of melee system you want, while I would say give this a look and see if it will do, this may not be organized the way you’d like.
  • This entire system is built server-side. There is a LocalScript with a few simple functions a little bit pre-setup if you want that but the actual functionality of the sword that you will see when using it is all done through a server Script. It was just simpler that way.
  • This system is not perfectly built or anything. I wanted a simple way to make basic swords that just work wherever you put them, provided you don’t have any special requests of it. Although it is built to be relatively simple to edit should you want to tweak with it at all.
  • The system that picks Animations and Sounds for swinging will SKIP OVER any Animation or Sound with the name “Equip”. This is because if you have equip animation toggled on, you can name your animation and sound simply “Equip” and it will use those.

The Link:
So finally enough talking, here you go. I am not asking for credit or anything use as you wish, I made this to fill my own need and thought I can’t be the only one that might need it. I would suggest looking in the Settings before using as you can make any adjustments you’d like there and there are a couple notes to help you understand what you can do with the sword. If you have any questions ask away, any problems let me know and I will look into it. Not sure if I have any plans for adding more features but if you have suggestions feel free to let me know. Enjoy :slight_smile:

19 Likes

Do we load and export the animations saved under the model “AnimSaves” or the folder “Animations”. I tried saving both to Roblox and then replacing their old animation IDs with the new ones created, but I had no luck.

Oh my bad, so the AnimSaves are the animations themselves, you can delete it afterwards. You wanna put any animations you have in the Animations folder.

Oh shoot that’s my bad, I had done what you said but my game is set to r6 while the animations are in r15. Is the sword system compatible with r6?

Should be compatible you would just need to make R6 animations

Great, thanks!
jsdadoadjaosdjoasdjo (for 30char)

How would I do IDLE animations with this?

It’s not designed for custom idle animations. So you would have to disable the default one and make the tool play/stop the animation on equipped or unequipped. The other way would be to handle welding the tool to the players hand directly, and running whatever animation you want from there.

2 Likes

So… I recently was trying to use this system and got an error on line 137 of the ServerScript.
It says: Attempt to index nil with Parent

Edit: This only happens when I damage a NPC or Player.