how to cast to enemy to get the name variable

but when i tried switching the type from enemy to actor it couldn’t connect to the variable name so how would i get name then?