how to make a respawn that teleports player to his checkpoint in 3D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By arturosik

hello, I’m new to GDScript so I don’t quite understand it, I wanna respawn the player and teleport him to a checkpoint when he presses r (respawn key)