First time Animation (help needed)

Guys, it’s my first time trying animation and I came upon a problem which I have no idea how to solve.
Here are my screenshots from 3ds max (it works perfectly there), along with the bones.

And a screenshot from animation preview in Unreal Engine, where I got this (which I assume is wrong root or something).