- I have a local script to take all the inputs of the player then I fire a remote event when a keyboard is pressed.
- In a server script I receive any needed parameters and use the corresponding function stored in a module script.
- I then play the animation and use animation events to handle when hitboxes are used.
-Things for the hitbox such as size, damage and etc are stored in a table in the module.
-Physical things for the weapon such as animations and models are stored in the
The main issue with this is the fact that I can not vary things a lot. Occasionally I can add small details using Animation events but it gets really messy really quick when I have multiple effects or special behaviours for 1 animation. The system is also hard to make altering hitboxes for (like the first basic attack having a wider hitbox than the second)
I could make the whole game using this method but like I said it gets messy and I'm just unsure if this is the right way to go about it
(I was fairly new to this as I had seen someone doing it with guns on a view model series I was watching)
-Create a separate module script for each weapon and play the animations in there.
-I link the animation events to a function that fires a remote event whenever something needs to be done on the server side.
-I still have a module script for basic things such as making the hitbox
-I no longer use a table to store damage as I can store it in the module script or hardcode it.
-animations and models are parented to the module script
The issue with this is that I need to constantly repeat code that I wouldn't in the first one as they are all in separate modules. This however allows me to customize the attacks better. As they modules are made individually. I can hardcore things such as altering hitboxes.
You only really need to read the part labelled questions and the paragraph before it
But it's easier to understand if you read the whole of it.