The Best example of what i want is the closing zone in playeruknows battlegrounds. I want it to close in to a random part of the map, getting smaller and smaller each time and taking damage when you are outside of the zone. I have a heath system already made so i can add and take away health but not sure how to add the zone. Thanks for any help!
A Sphere Collider, a list and a loop (Update or Coroutines).
When any of the players exit the collider, add them to the list.
When any player enters the collider, remove them from the list.
Repeat the list, and damage them over time.