Slow motion when enemies nearby

I am trying to make it so that if there any enemies close to you, time will slow down. If there are 0 enemies nearby, time goes back to normal. I anticipate that I will have to use tags, but for some reason I just cannot get it to function properly. Can somebody script this in blueprint and screenshot it for me? Thank you!

I got it! For your Hero Character, put in Event Actor Begin Overlap - Cast To Enemy - Set Global Time Dilation.
Then, Event Actor End Overlap - Cast To Enemy - Set Global Time Dilation.
It seems to work perfectly even without an “less than” or “greater than” statements, as far as I can tell.
Then, in your Enemy Character, use On Component Begin Overlap, connected to a Cast To HeroX as well as ‘other comp’ connected to a “Component Has Tag”, which is then connected to a branch. Then make sure the enemy has a proper component tag, and you should be good to go.