RigidBody FPS Walker Collision Glitch

I know this probably has been asked so often but I just kind find the answer. Whenever I hit an object the player starts moving automatically backwards and if the collision takes place in midair the player gets catapulted away…it would be great if you could help me with this or give me a script that works flawlessly (only have the old one from the Wiki)

It’s simple, make a script to detect collisions and if statement to subtract a value from the relative postion of the FPS Walker to simulate a knockback