What happens is that the doll wants it to transform when it touches an object, that I already managed to do. but when it transforms and the player moves the program gets stuck. I have created a kinematicbody2d scene with the new skin and it is the same character and when the power is seized one is erased and the other scene appears and I move there is attached the code of when the other scene is transformed duplicates the same of the skinless player.
func _on_alas_body_entered(body):
if(body.is_in_group("jugador")):
var nuevo_poder = get_tree().get_nodes_in_group("menu_1")[0].poder_alas.instance()
get_tree().get_nodes_in_group("menu_1")[0].add_child(nuevo_poder)
nuevo_poder.global_position = body.global_position
body.queue_free()
queue_free()