Not sure what I was thinking when I commented the last time. When you your using a sub field you always need to create a loop for the parent field.
if (have_rows('parent_field')) {
while(have_rows('parent_field')) {
the_row();
$text = get_sub_field('sub_field_name');
}
}
The details of what row and sub field you’ll need to work out for yourself, but you cannot use get_sub_field()
without creating a loop.