How to make an object freely rotate on an axis?

Not really. I want it to be like scrap mechanic. Adding wheels on the fly, thrusters, crazy stuff like that. Like space engineers, no in game editor, just simple adding wheels or seats the same way you place blocks in Minecraft.