How do i prevent platformer characters moving with a moving object

What are you doing here? Do you understand what changing the x offset actually does?

Here’s an explanation of how drawing a sprite from an offset works