Tips on creating an attack system?

For a while now, ive been struggling on how to create an attack system. I have a general idea of how to replicate VFX between clients and how to create functional hitboxes, however, I do not know exactly how the movescripts and objects should be organized.
The idea that I have been considering is to have a main input script, a server-side AttackManager, and a client-side AttackHandler. On client input, a remoteevent (containing a tag for the requested move) would be sent to and received by AttackManager, which would then send an event to each individual client’s AttackHandler. The AttackHandler would then find the move’s folder in replicatedstorage, where it would run functions from the movefolder’s attackscript. (a modulescript containing functions such as starting, releasing, or performing hitbox detection for an attack.)

My question is whether or not this is a viable approach, and if it is not, what a better one could be. Any and all help is appreciated.

2 Likes

don’t worry about how you’re doing it, you’ll learn the best approaches as you go. results are key now for you

Yes, this is a valid approach to the game your making. Especially having your moveset necessities inside ReplicatedStorage. If you clog ServerStorage with a bunch of assets and modules, it will cause the game to lag. Having things in SS is good, just not to the point where it’s too much. This prevents lag and is overall a cleaner experience for the player. You also got all the script types and locations right for an excellent combat game.

2 Likes

Thats a good point, actually. Il still keep looking around before I fully commit but il keep this in mind.

1 Like