How to switch the texture being used by the material of the mesh renderer

When the level starts the player has to choose different parts of different animals. For example the head and body of a cat, the tail of a squirrel and the legs of a kangooroo. They'll see this in the UI that we built, but when the player presses play the appropriate model has to be built, according to his choices.

At first we wouldn't animate them, but maybe if we have time before the deadline we'd like to do something simple: a slight rotation around an anchor point at the top of the legs that makes them move back and forth. But nothing too complicated, it's meant to be a bit cartoony. It would be awesome if we could just get it to show the correct model, with the proper textures applied, so how do we switch do to use a different texture? :x

Simply this, if your script is placed on the gameobject whose texture you want to change:

renderer.material.mainTexture = yourNewTexture;