Okay, so I omitted the function but now the game freezes telling me the line “get_tree().change_scene(targetScene)” refers to a nonexistent function when I touch the flag, even though that is what the tutorial I linked to told me to do word for word.
Can you guys please help with a solution/workaround?