Hello, I’m working on a game called Munition Mania, a 2D platform fighter similar to SSB and Brawlhalla.
I’m trying to achieve smooth and responsive combat, like in games such as Grand Piece Online.
But, I have a question since this is my first time making a fighting game with more complex combat.
What’s the best way to achieve knockback?
What BodyMover or Force object should I use? After registering a hit on the server, should it be created on the server or on the opponent’s client? (How do the best games on the platform do it?)
But a similar effect can also be achieved by inserting a BodyForce and instantaneously destroying it after applying the force.
Unfortunately it does not matter whether this is done of client or server as it can be deleted by an exploiter regardless. (Or they can just momentarily freeze themselves to ignore the effect)
Please follow up if someone has a better method, this may not be the ideal solution.
If you’re using it on the player’s character, it doesn’t matter, since the player will have the network ownership for their character so all the calculations will be done on their client anyway (even if you use it on the server).
I’d recommend using a VectorForce though. BasePart.ApplyImpulse can only apply a force to the center of mass:
with VectorForce you have way more control and a lot more properties you can configure to get the desired result. plus you can apply a force relative to other attachments which can come in handy.