Need help on making it so that everything in the map goes back to its first position whenever the player dies

Im trying to make it so whenever the player respawns the whole server sort of resets if that the way to say it. Like if something had moved 100 studs away it should go back to its first position when the player respawns. I need this because if they aren’t at the same place when respawned it wouldn’t be playable and would keep on dying. The respawn time is probably going to be about 10 seconds. Thank you!

In the script of the moving part, before any movement is being done, set a variable for the original position of the part:

local OriginalPos = script.Parent.CFrame --Take the CFrame of the part

Once the player dies, make the Part go to it’s original position:

Player.Died:Connect(function()
    script.Parent.CFrame = OriginalPos --Set the CFrame of the part to it's CFrame before any movement
end)

You are best of copying the map and parenting it to ReplicatedStorage or ServerStorage and then when the player dies you destroy the old map and take the copied map into the workspace