How to rotate bone in C++?

How would you go about setting the “Torso rotation” in C++ code? I’m trying to do the same but the bone is acting weird when i move the actor.