extends Sprite2D func ok(): var characterselect = load("res://characterselect.tscn").instantiate() as Node2D (self.find_parent("StartMenu").get_node("AnimationPlayer") as AnimationPlayer).play_backwards("new_animation") (self.find_parent("StartMenu").get_node("AnimationPlayer2") as AnimationPlayer).play("easy_selected") get_tree().current_scene.add_child(characterselect) # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: self.set_region_rect(Rect2(256,0,256,80)) if(self.get_meta("selected") == true): self.set_region_rect(Rect2(0,0,256,80))