Welcome to the forums @TrueSaltireX!
For a really simple way to do this, you can just add a variable to your player to store the position, and then move the player to said position when they hit a hazard. For example (untested, pseudo code):
extends KinematicBody2D
var respawnpoint : Vector3
# other code here....
func _ready():
respawnpoint = global_position
# other code here...
# on the respawn/death function
func respawn():
global_position = respawnpoint
# reset anything else here!
Then in a function connected to the body_entered function, you just need something like this:
func on_body_entered(other):
if “respawnpoint” in other:
other.respawnpoint = global_position
And then that should correctly place the player at the stored position when the respawn
function is called.