Your code should look a little more like this:
extends Node2D
func ready():
$frisk/AnimationPlayer.play("wakeup")
OR, if you want to make it wait a little before it plays the anim, put yield(get_tree().create_timer(SECONDS_TO_WAIT), "timeout")
before the AnimPlayer.play() line.