Minecraft: testfor not full health
I have a command block linked to a timer with the following command:
kill @p[score_health_min=1,score_health_max=19]
I also have a second command block with this command, triggered earlier when the player starts the game:
scoreboard objectives add health health
When I slightly injure myself (to a health of under 19), I don't get killed! Why not? Do I have any errors in my commands? Thanks for any help that anyone can supply!
Best Answer
Try using this line instead and make sure your timer is always ticking:kill @p[score_health=19,score_health_min=1]
Right now you're checking for score_XYZ_max, which doesn't exist as a target selector argument. You need to check for score_XYZ instead, which is checking for a maximum.
Pictures about "Minecraft: testfor not full health"



How do you check health in Minecraft?
If you use /scoreboard objectives setdisplay sidebar , you can view your Health on the sidebar. If you take some damage, you might notice that your Health is always listed as a whole number instead of a decimal like before (18.44835f).Is Testfor still in Minecraft?
You can test for a certain target in the game using the /testfor command in Minecraft. TIP: Starting in Minecraft Java Edition (PC/Mac) 1.13, the /testfor command was removed from the Java Edition version of the game.What replaced the Testfor command in Minecraft?
The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*.Minecraft Redstone Tutorial | How to use testfor commands in MCPE!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Rene Asmussen, Ylanite Koppens, ANTONI SHKRABA, Kaboompics .com
