You didn't instance the node.
preload
gives you a Resource
, in this case it's a PackedScene
resource. You must use .instance()
to create an instance of that scene, and only then you can add it to the tree:
func _on_ButtonIntro_pressed():
var res = preload("res://test.tscn")
var nodeToLoad = res.instance()
get_parent().add_child(nodeToLoad)
FYI, it says the p_child
parameter is null because the engine fails to cast your resource to a node, because nodes aren't resources.