How do I reset or respawn an object after I die?

I made a game where I jump up platforms with checkpoints along the way. Lava is slowly moving upward. I attached the respawn to the lava. When I touch the lava, it resets the player to the last spawnpoint on the checkpoint. My question is how do I reset the lava back to the beginning or to a certain point after I get touched by the lava?

When the player touches the lava, just store the position of the lava at that time. When the player respawns, set the lava back to that position. Or, have an array with fixed positions of the lava for each respawn point.

Hope that helps.

Do you have a script, I am new to unity…
I do not know what arrays are and stuff… sorry…