youd need to save the movement for each frame before that moment and hold about 600 frames or wtv depending on how long the time rewind can be set, or hold information like when the player moved right and for how long, when he jumped and ect, then find a way to play that backwards.