Example that is working in front of me... maybe it helps
Cube is base object that is moving in room (either with keyframes or phyicsphysics works). Sphere
Sphere is 'hanging' from cube via an EMPTYempty with generic spring (first object sphere, second object cube). The Emptyempty has is parent set to the Cubecube (so it follows it around).
result -> ballResult, the ball hangs as if on spring bouncing up and down following the cube and empty.