Hi, I’m new to rigging and I need help with this robot character i made. I’ve only rigged small thing before and this i a little bit more advanced for me. Would really appreciate if anybody could help me i the right direction.

I need to rig the legs of the robot and made a simple animation of the leg should bend.

Also theres this youtibe video that show the animation of the leg.
https://youtu.be/wPb9lZYWRvU?t=26s
I tried making a rig but got stuck with the bending at the joints. Heres my current rig

Would really aprreciate if anybody could help me i the right direction
