Anyway to make closest player to retical not target dead ppl

When have have the workshop target someone with closest player to retical, how do you make it so it doesn’t target dead people. I use is alive cloest player to retical team of event player, but it doesn’t work so idk what else would make it work