<Also I'm terrible at explaining stuff like this, and not that great of a teacher, so please feel free to correct/elaborate on>
Fairly simple script, this is what I've been using to set up "animations" for moving vehicles and animals. This is done by recording different "poses" or key frames of animation for our object. I'd recommend naming each child-prim A,B,C, or 1,2,3 or something identifying each "piece". Keep in mind that the root prim, the last-selected prim of our link set which will appear highlighted in yellow instead of white (Edit:Hello 1.7, Ok, now blue

1. Create a linked object and put the "Get Local Rotation/Position Script" into each child-prim. (Remember to give everything a unique name) Don't need any scripts in the root prim, but the root prim will be our "center" and should not be moved while recording our poses.
2. Take a back-up copy of your object into your inventory.
3. Either use the "edit linked parts" checkbox, or unlink and relink your object (and remember to link using the same root prim, choose the same piece last while linking) - Position each child-prim into our "pose".
4. Here's where I use Notepad or Wordpad or some external text editor - I'm not sure why, you can just as easily use a notecard ingame. Click on each child prim in sequence (this is why it's helpful to name them all a,b,c,ect) - Then open the history log and capture all of the text they spit out. Should look like:
A: PRIM_POSITION,<143.22061, 102.92537, 194.64525>,PRIM_ROTATION,<0.05419, -0.24445, 0.20955, 0.94520>
B: PRIM_POSITION,<143.22061, 102.92537, 194.64525>,PRIM_ROTATION,<0.05419, -0.24445, 0.20955, 0.94520>
Ect, ect, depending on how many child-prims your animating.
Paste this ALL into our notecard. I usually type a "title/header", something like "POSE T1" and then paste it in a line or two beneath, because we're going to be recording each keyframe or "pose" and then pasting them back into our SetPos/Rot scripts.
5. Start back at step 3 - And using either your existing pose you just set up OR by pulling that backup back out of your inventory, make another "pose" and record it to our notecard.
6. Take all of our Get Pos/Rot scripts out of each child prim and replace them with the Set Pos/Rot script.
7. In each Set Pos/Rot script, we're going to paste back in what we have on our notecard. In the example Set Rot/Pos script here it's listening for 3 linkmessages, "t1", "t2", or "t3" and calling llSetPrimitiveParams accordingly. So look at our notecard, and from what we've recorded as POSE T1, POSE T2, ect - look for A: PRIM_POSITION,<143.22061, 102.92537, 194.64525>,PRIM_ROTATION,<0.05419, -0.24445, 0.20955, 0.94520>
and copy right after A: (or Object: or TailPieceA:, allll depending on how you named the child prims). Open our Set Pos/Rot script in our first child prim "a" and paste what we just copied at the first //******* PASTE "POSE" IN HERE ********
Then back on our notecard under POSE T2 find A: and copy that PRIM_POSITION line and paste it in to the next place you see //******* PASTE "POSE" IN HERE ********
Then take and copy POSE T3 from the notecard and paste it in the 3rd and final spot in our SetPos/Rot script.
8. And then, move on to B, or the next child-prim in your linkset and repeat the process. The result will be that when you put one main script into your object, and put in the line:
llMessageLinked(LINK_SET,0,"t1",NULL_KEY);
We will trigger the pose we recorded first onto the notecard and named "POSE T1"
And that's about it... If you have a vehicle you can make the main script send a single or a series of link-messages to trigger and "play back" each keyframe/pos. IF you're triggering a series of poses all at once, make sure you put llSleep(0.21); in between each place you're calling a new pose with llMessageLinked - this will help keep everything in synch and from "breaking up" by queueing and "piling up" calls for animations, since each time your child-prim moves IT will sleep for 0.2 seconds.
This is our Get Local Rotation/Position Script
CODE
default
{
touch_start(integer total_number)
{
llOwnerSay("PRIM_POSITION," +(string)llGetLocalPos()+ ",PRIM_ROTATION," +(string)llGetLocalRot());
}
}
This is our Set Local Rotation/Position Script
CODE
default
{
link_message(integer sender_num, integer num, string message, key id)
{
if(message=="t1")
{
llSetPrimitiveParams([
//******* PASTE "POSE" IN HERE ********
/ ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot())
]);
}
if(message=="t2")
{
llSetPrimitiveParams([
//******* PASTE "POSE" IN HERE ********
/ ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot())
]);
}
if(message=="t3")
{
llSetPrimitiveParams([
//******* PASTE "POSE" IN HERE ********
/ ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot())
]);
}
}
}