I'm trying to change scenes but it tells me " no loade found for resource : res://next_world "

Costin25Costin25 Posts: 5Member
edited December 2018 in 2D
extends Area2D

export(String , FILE , "*.tscn" ) var next_world

func _physics_process(delta):
    var bodies = get_overlapping_bodies()
    for body in bodies :
        if body.name == "Player": 


  • TwistedTwiglegTwistedTwigleg Posts: 1,000Admin
    Answer ✓

    The problem is you are trying to change scenes using a string and not a resource path pointing to a scene file.

    Assuming you have set next_world in the editor, then all you should need to do is change the line that reads get_tree().change_scene("next_world") to get_tree().change_scene(next_world) and it should work. :smile:

  • Costin25Costin25 Posts: 5Member

    It works without the quotation marks just as said . thanks a lot !

Sign In or Register to comment.