How do i make my character stay mid air while i attack

Set enable gravity is buggy.

There is a “Set Gravity Scale” function (or similar name) in the CharacterMovementComponent, you can set that to 0 at the begin of your attack and back to 1 at the end.

Thats just a workaround and I don’t know how to apply this to other actors/BPs