Test isactive() on every player in getagents()

Im new to coding and the verse language but i have learned a lot from this community so firstly thank you all!

I have some code that respawns spectators on a timer and it works flawlessly. I currently have no way of testing with multiple teams since im creating this by myself. But thinking on how verse runs, and im speculating this, when my team is eliminated it will go into spectate mode and my respawn script will respawn them even tho the entire “team” is not active, which i dont want to happen. So before the respawn script is run, i would like to check if ANY player on the current team (getagents()) is isactive(). If i understand correctly get agents will create an arry(list of players). Can isactive test the entire array to test if any one player is currently active? I dont have a set amount for each team( team size varies) so indexing each player isnt really viable in my opinion. Any information is appreciated!