Custom rig not working properly

So I don’t know whether this belongs in scripting support of building support.

I made this custom right and it always faces the same direction.

Here is what I mean:

How could I fix this, did I rig it wrong?