Hi there, nice job!
So, to make it work separately for each player, you need to identify which player the character belongs to and conditionally apply the invincibility based on that.
Here's a modified version of your code that should help separate the invincibility for each player:
bool...