Say there is a block that moves to the right. After a distance it hits a spring, and then it compresses the spring. Does this mean that the work that the spring does on the block is positive or negative? I would say it is negative because the block compresses the spring, so the displacement which is to the right is in opposite direction of the spring force, which during compression is trying to push the block to the left. Am I correct?