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

You may want to try using the flying movement mode while the attack are performed.