How can I record a player's movements and be able to replay them?

So, I’ve made an obby and I wanted to make it so that an npc could complete it.
It’s meant to be a really basic obby however, the problem is, I can not use pathfinding service because I don’t know how to make it jump over a “killbrick” and because pathfinding service is really hard for me to use personally.

Now, I’d like to make a system where I could record my own movements and then use :MoveTo() and Humanoid.Jump = true on the npc in order to complete the obby.

If anyone could atleast give me tips on how I could record my player’s movements or atleast another alternative to have the npc be able to complete the obby, I’d appreciate it.

I’m not exactly sure if you want this but this might be helpful ReplayService - Replay Your Best Moments. Any Place, Any Time. (Pre-Release Version Available)

It looked promising however, it doesn’t work, it’s too buggy and I can’t even make a recording with it.

oh ok, I never tested it so i didn’t know

It would be pretty hard to record your exact movements and be able to replicate them with an NPC. In this case, what I’d do is use UserInputService and bind it to a key, like say “E” that sets a checkpoint for the NPC. So I could walk forward, press “E”, and it’d save my position to the log, same thing with pressing “Space” for jumping. To extract the data from the script, you could make it print your position/jump table whenever you press a certain key. This table could be a simple indexed array that uses the index as the order of the events and the value for the position/jump action. Then it’s as simple as using a for loop (and checking if action is complete) to make your NPC follow those.

1 Like

Hey hey!

Could you give a more in-depth report on what prevented recording, be it an error, etc.? Also, if you could give me a code sample of the way you were executing, that’d be awesome.

Thanks! :slight_smile:

I know that I’m answering late but I had problems when recording the movements, the game did not load, I mean, I could not test it because it did not load anything