How do you handle last-minute team changes?

We recently faced a situation where one of our key players got injured just before the game. It threw our entire lineup into disarray, and I wasn’t sure how to adapt quickly. Coaches, what strategies do you use to manage unexpected roster changes? Would love to hear your experiences.