how to reload current scene godot

To reload the current scene in Godot, you can follow these steps:

  1. Use the following code to get the current scene's file path:
var scene_file_path = get_tree().current_scene.get_filename()
  1. Then use the following code to reload the current scene:
get_tree().reload_current_scene()