Can someone help me with my knockback system?

What I understood from the initial description and what the script I suggested does is this:

And you’d rather have that:

Could you confirm?