Vertically Move Character during Montage

I have an aerial attack animation which causes the character to move upwards. I’ve done the animation in such a way that the root bone moves upwards along with the animation in 3DS Max. When I import the animation and play it, it looks fine. However, once I click “Enable Root Motion” and have it on, the animation no longer moves in the z-axis. I read on other pages that I need to change the mode to flying mode while the animation is playing but it did not seem to work for me, or maybe I didn’t do it correctly. Is there another method of making this work? If not, how do I go about changing the mode to flying mode during the animation only? Thanks!