Make player respawn when collidiong with CollisionShape2D

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

How do i make my player respawn when colliding with my CollisionShape2D?

Reinstance your Player scene or just hide/show, disable/enable the player’s shape when killed/respawn.

Dlean Jeans | 2019-06-10 18:21

but how do i make the world respawn on collision?

Zync | 2019-06-10 18:25

:bust_in_silhouette: Reply From: sparkart

If you want to reload the scene you can use the scene tree singleton and reload current scene:

get_tree().reload_current_scene()

Iam really a noob at programming so… how do i make it react only when the Player collides with my collision

Zync | 2019-06-11 05:38