I’ve tried constraints, as well as body movers but I can’t seem to recreate the knockback.
I want the knockback to travel the same distance no matter if the character is in the air or not.
What solutions have you tried so far?
I’ve looked through quite a lot of posts but couldn’t find much.
Body velocity, the distance traveled varies if the target is in the air or not, while in The Strongest Battlegrounds the same distance is traveled either way.
Align Position so far has gotten me the closest results, the distance traveled is the same but there’s also an issue with it, if the target is in the air then they will continue flying and wont drop down to the ground until the constraint is disabled.
I use one attachment mode and set the Position property to the front of the character.
(I’m mostly trying to recreate TSB’s dash movement.)
A bit of another question: I’m not sure as to do knockback on the client or server, currently I’m doing everything on the server.
For linear velocity created on the server, the target seems to “teleport” on other client’s screens.
This is my first post on the dev forums, I’d appreciate if I wasn’t left without replies.
Thank you for your time!
I’ve tried to use that on the server side before but nothing happened so I gave up on that method.
Does it not have the issue of the distance traveled being different if the target is in the air or not?
Okay, looks like it wont work on the server because of Network Ownership, so you can send a remote event to the client to tell them to Apply the impulse to themselves.
I tested it a few times, and it seemed pretty consistent when testing on myself. You can give it a shot too, just run it in your command bar in studio while in play, and you should be able to see its effects.
Play with the values, i had to use ApplyImpulse(Vector3.new(0,1512,1150)) for mine, but yours can vary. You can also calculate the value you desire based on the player’s mass to get a properly consistent rate
I tried it out with the command bar, but I see that the distance still depends if you used it in air or not, this is not what I’m looking for. Thank you for the reply though.
knockback(normal combo kbs) like in battlegrounds games
this might seem odd, but they make their knockback on the server using bodyvelocity try it urself
To not leave this post without an answer for new devs in the future, I found it a long time ago:
Linear velocity on the client side - works perfect for simple knockback.
(For players! dummies are a different story. And yeah there will be a slight delay because of ping but you can’t really do anything about it)
Here are properties that I use (VectorVelocity changed by script of course):