Herd System spawned AI to follow the leader

Hi everyone hopefully you are all doing great during these crazy times. I was following a tutorial on youtube to create a herd system and it’s working pretty well.

I’m having an issue where I have a master animal character_bp that holds the spawned class as a variable, that spawns a child_Bp. That child_ BP is what I place in the level then in the child_bp I entered the correct spawn class that spawns with begin play at an integer amount.

How do i get the spawned AI to follow the leader (Leader as in the Child_BP placed in the level)?

With this random roam they all just move randomly, I’m trying to get the “leader” to only roam randomly, eat, rest and the spawned to follow the leader within radius while also eat, rest once within radius of the leader. The reason for this is if I play an enemy character and get close, I would like the spawned to run in the direction of the leader wherever its going.

I do have references to the leader and the spawned as separate variables and the line traces worked. I just don’t know how to work it in this random roam.

Thank you for taking the time to read this