how to start the timer function?

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

here is my code for timer… the func _on_Timer_timeout() is not working for me

func _on_turrets_bullets_body_entered(body):
player_node = get_parent().get_node(“Player”)
dead_player_node()
queue_free()

func dead_player_node():
Global.character_destroy_sounds()
player_node.get_node(‘Particles2D’).emitting = true
player_node.get_node(‘character’).visible = false
$Timer.start()

func _on_Timer_timeout():
get_tree().reload_current_scene()

:bust_in_silhouette: Reply From: Adam_S

Remove the queue_free() and your code should work.

Thank you, its working

juanMAMAW | 2020-09-16 22:37