Help with an Attempts system

Hello devforum! I’ve been trying to make an attempts system for my horror game where after you die once, everything resets (your tasks that you’ve done, the map, etc.) back to its original position/form, (it also keeps track of your attempts when you die but I’ve done that already.) The issue is I don’t really know how to go about resetting everything like i said, anyone have any ideas on how i could do this? Thanks!
(my bad if this is in the wrong category).

Try putting the map in ReplicatedStorage or ServerStorage (depending if you want to allow the code to be run from the clien) and when the player dies, clone it and parent it to the workspace, and reset the player’s position.