Place it at the end of a helpful moment, just after the favour is shown, then follow it with a cheer to close the scene. For a comic contrast, put a surprised reaction before it, so the thanks lands as the punchline to the setup.