What is the best way to rig/attach parts a robot?

So I already created a rig and everything for my Optimus Prime model but I’m not sure how to attach the parts to him. I’m guessing I can’t just parent every part, because I wanna make a transformation later on and parts need to move, rotate, etc… to other parts of his body and stick to that part from that point.

The blue and red parts basically need to rotate in place (the wheels), or unattach from the part they’re moving with, move to another part in some cool way, and then attach it there. Honestly I have no idea how to start with this parenting/constraints? so any help, feedback or tips would be amazing!

I just did a search on YouTube and found many tutorials on rigging robot type characters.

Yes, but those don’t have moving parts on the model. The parts are just parented to the base part with the appropriate bone. In my case, I can’t do that since I wanna move parts around. Didn’t find any tutorial for that.

You have to address each thing you want to do individually. There’s no “learn how to rig everything” knowledge, it’s just a collection of individual techniques.

There’s this concept of “deformation”, which isn’t a bad thing like it would be for human babies (a lot of beginners misunderstand that.) If a single object stays as a single piece, it doesn’t deform, and you can get away with bone parenting the objects. If various bits in a single object don’t all move together, as a single piece, then you have a model that’s going to “deform” and you need to assign weights to bones and use an armature modifier to make it work.

For robots, it’s usually possible to make object level divisions (by separating bits of meshes) so that deformation isn’t necessary, which is why you see so many robot-rigging tutorials that do only bone parenting. If that’s not going to work for you, then you should look at character rigging tutorials, even though they’re not showing you robots, to learn rigging techniques.