I’m making a combat system that uses both swords and magic. It will include blocking, parrying, and dodging but I have no idea where to start. Like for example, how would I know if they are parrying or not or how do I cancel attacks if they are hit during the wind-up, and etc. I made a previous post that goes over my initial thought process: Can someone help me with outlining my combat system?
any resources or guides on how I can outline my combat system would be great. The fact it uses both magic and sword combat, both being block, parry, dodgable makes this a bit more complicated then I would have liked.
you’re gonna need to use either the UIS (UserInputService) or the Mouse to detect inputs and clicks, then you’re of course gonna need animations. You should also use tags and attributes to make it most efficient. You’ll also need to learn how to use remote events and remote functions.
I like using as the person above said, various services such as userinputservice, contextactionservice, and using remote functions to get a player’s mouse from the server. For states such as blocking and parrying I have a module which indexes a player and has states there, its cleaner than attributes and opens up metatables if I need them. For canceling animations I name all my animations specifically so It’s easy to sift through humanoid’s playing animations. I have modules for different attacks and in there I have functions for canceling them which I fire using the name of the playing animation and finding a module with the same name as it and then firing the :cancel method I created.