I tried that way below and gave an error.

var question_box = load("res://Source/Scenes/Level-4-1.gd").new()

func _on_Area2D_player_entered(_player: KinematicBody2D) -> void:
	question_box.question_change(level_at)
	using = true
	pass # Replace with function body.


func _on_Area2D_player_exited(_player: KinematicBody2D) -> void:
	player_entered = false
	using = false
	pass # Replace with function body.

The error:

LuanSantos95 but how will I pass question_change(), a function at the level script, into the elevator script? I need to implement it there too?

You can connect signals across nodes.

edit: share the project? It'll probably easier to help out if we get access to the project. zip it up and if it's too big maybe host it on dropbox or google drive or such.

    Megalomaniak Sure! I don't know if it's possible, but maybe a direct meeting or something like that would help too.

    PS: It's the level 4-1.

    Before I download it, what version of godot are you running? The project is named Python Educational Game so I presume some custom Python build of the engine?

      Megalomaniak I'm running Godot 3.2.3, and no, The "Python" at the name is about the metaphores that I'm using for teaching Python at the stages

        LuanSantos95 Godot 3.2.3

        OK, good to know, and worth mentioning that 3.2.3 is rather old and outdated. No longer supported so worth considering a update.

          Megalomaniak Ok. I use that version because it supports OpenGL 2.0 that, at earlier versions, it didn't support. But yes, I need to update it.

            change the contents of the area entered signal from:

            func _on_Area2D_player_entered(_player: KinematicBody2D) -> void:
            	question_box.question_change(level_at)
            	using = true
            	pass # Replace with function body.

            to:

            func _on_Area2D_player_entered(_player: KinematicBody2D) -> void:
            	_player.get_parent().question_change(level_at)
            	using = true

            Since the node/script that holds the function is on the level node which is the parent of the player that enters the area. That should fix your immediate issue. I have a sneaking suspicion your next problem will be determining what level it is so the correct box gets shown.

            Also the pass keyword is unnecessary if the function is no longer empty.

              LuanSantos95 Another problem is that when I choose the right answer (using grab_focus( ) function) I can only choose with 'Enter' key, not with 'E' key, the interact key. It's very strange because the elevator lifts up when I press 'Enter', and 'E' later.

              I only see E key mapped to 'interact' action and not to any of the UI_ actions, neither 'ui_accept' nor 'ui_select'(though it would seem that pressing space also doesn't trigger the focused buttons pressed signal).

              I do see an if event.is_action_pressed('interact') on the elevator node but there's nothing in there to make a ui selection. So I'm not sure why you'd expect the interact action/e key to select anything in the UI.

              You could use the get_focus_owner() method from a control node class to find out which node is currently in focus and then use that info to trigger that focused control nodes pressed signal if it is/inherits from a button class. But elevator is not a control type node(and shouldn't be since you want to move it as a kinematicbody after all) so I think you might want to migrate that specific logic elsewhere not keep it on the elevator node.

              LuanSantos95 But yes, I need to update it.

              Well, I don't know that you need to but it's probably a good idea.

              Megalomaniak I will try that way, but I achieved by other means but the question change is working perfectly fine! Thanks!

              About the UI keys: For some reason, I can only select the option with 'Enter' key, but not with interact key, by the fact that they're reserved UI keys.

              That way, I select the option with enter e lift the elevator with interact key.

                LuanSantos95 For some reason, I can only select the option with 'Enter' key, but not with interact key, by the fact that they're reserved UI keys.

                Well, yeah, as I said, you have not added any logic there for the interact key to trigger the buttons pressed signal. Now that I think about it tho, you could just trigger the 'ui_accept' action via code there when e/interact is pressed.