godot get root node

To get the root node in GDScript using the Godot game engine, you can use the get_tree().get_root() method. This will return the root node of the scene tree.

Here's an example of how you can use it in your code:

var root_node = get_tree().get_root()

This will assign the root node to the root_node variable. You can then use this variable to access and manipulate the root node as needed.

Please let me know if you have any further questions.