Addforce adding force in the wrong direction?

Hello i am in the process of making the movement for the character i the game im making, im trying to add a dash which i have gotten working correctly but for some reason when i dash in 30*/60* of the x and z axis it gets curved, the effect gradually reduces until you’re att a 45/90* angle where there is no effect.

my dodge code:
screenshot of a code editor

// @TODO: add code here

i cant add more screen shots since this is a new account…

this is all based of the code in the script from the asset “Modular First Person Controller” from the unity asset store, although its quite edited in some parts.

Please add the code to the post, not a screenshot. The screenshot is too low resolution to be able to read properly! You can use three tickmarks ``` to make the code format as code instead of text.