Good question, this is a bit more advanced though you can notice some patterns like when walking forward Z is equal to -1 when it is in object space, backwards is equal to Z =1, right is X = 1.
You could even convert it into an angle by using:
local x, y, z CFrame.lookAt(Vector3.new(0,0,0), movementDirectionRelativeToHumanoidRootPart):ToOrientation()
–>Create a cframe looking towards the movement direction
→ Convert it into orientation for angle terms
You can do something like @i_eetANts which also uses the idea of getting a movement vector relative to the humanoid root part and then rounding it to the closest movement direction with an animation assigned like walk forwards, walk right and convert it into a hash/string identifier.
The result looks pretty good similar to Inverse kinematics which is interesting.