detecting death events with commands

my command (repeat, always active) execute as @e[type=player] at @s if score @s deathEvent = 1 deathEvent in minecraft:overworld run tp @s 7.50 186.00 32.50 810 -4 i have immediate respawn on and another command block that sets it to 0 so it is either 1 or 0.

someone please help 😄

Continue to help post