I’m adding a combat system to my game where the player can unlock and buy weapons that they can add to their hotbar to use around the game.
The issue is that I’m not too sure how I want to set this up. My idea right now is that I have a folder of all the weapons in game inside of ServerStorage, then have a ModuleScript that has a function that can find any weapon inside of the aforementioned folder, and then add it to a table that represents the player’s owned weapons. The ModuleScript might have an array that has every weapon’s stats organized so that other script can pull those stats for other mechanics.
I was also thinking of using another script to handle when the player equips a weapon to their hotbar and when they press the keybind to actually hold said weapon, then a script (the same one or a new one I’m not sure) will handle actions related to the weapon itself (attacking, blocking/parrying, special abilities, etc.).
This is my basic idea of the foundations for my weapon combat system although I would like feedback if there are better ways to set this up.
(If anyone would like more specific details just ask.)
(I’ve also already posted this before but it only got 24 views in 17 hours so I’m reposting it)