How to put a score counter above the players head?

I figure out a nasty but working method to track deaths for any entity, I have a “soul” Armor stand per entity and give a score of 1+ point every tick, if it detects the entity alive it keeps resetting its score, so it’s adding and removing a score every tick. When the entity dies the soul will rank up 1 point per tick and at 5 ticks I can run any command such as adding a point to the death objective of a player as you will.

Running with conditional command blocks in a nutshell:

*Give Soul 1 point on scoreboard >> check if entity alive with testfor >> reset score

explanation: if it detects the entity dead ,the score stacks up since testfor fails and command to reset won’t be activated

*check score 5 >> kill soul(won’t respawn unless entity respawns) >> run what ever command which in this case add point to death counter >> summon soul again to that player

Have both run infinitely

The flaw with bedrock and this method is the issue of tracking itself, in order to link a soul to a specific player you simply need to add a specific tag to the Armor stand to the players tag , we can set one player’s tag and it’s soul to both DeathPlayer1 to solve this.

And another huge flaw is the ability to track a PLAYER death events. the entity death detection works by failing the testfor, the testfor always works even when a player is at the respawn screen, to fix that in theory what can be done is have a testfor the tag of that player at their respawn location. If it detects them at their respawn location it will consider it a death and adds points to the soul to force a death detection with the nasty method.

/r/MinecraftCommands Thread Parent