Agent reference doesn't work when nested in if statement?

Hello, I am using this code to try to revive a player if their custom player class has instant revive turned on. This code prints SelfRevive but the down and out device does not revive the player.

However, when I take the Reviver.Revive() out of the if statement and pass it the same Agent reference, the player does get revived.

I’ve never experienced something like this but am new to Verse so maybe I have some sort of syntax error here? The if statement is successful so I know the .Revive() is running, the only idea I have is that the Agent reference somehow does not reach into the nested statement? Any help would be greatly appreciated

Curious about this. Does anything happen if you put “Player” in the Reviver.Rivive() call instead of agent…like this: Reviver.Revive(Player)?

This worked, thank you! I knew player inherits from agent but did not realize I could use it like this! Do you have any idea why this happens, does casting to player somehow break the agent reference?