Im trying to make a command to if you get killed by a zombie you turn into a zombie so i made a zombie team and a objective that has killedbyteam.green
and i set the team color to green and when the score goes up you go to the zombie team but for some reason when i get killed by a zombie it does not increase my score and yes i have a command block that makes all zombies go to the zombie team i dont know what to do so im looking for some help
So there a few possible problems. First, you might not be tracked by the KilledByZombie score. You can test this by setting the display for KIlledByZombie to the sidebar. If nothing shows up then you can just add 0 to your score:
/scoreboard players add @a KilledByZombie 0
Second, you could be using actual zombies (the actual zombie entity). This would be a problem because I believe that the "killedByTeam.green" only tracks player kills (not mob kills even if they are part of the green team).
Third, you might have forgotten to add the player that's killing you to the green team. You could test this by adding that player to the KIlledByZombie score and looking at their name color (it should be green if they are on the green team).
Lastly, you could have a score higher than 1 already (which wouldn't trigger the team changing command because it only affects players with an exact score of 1)
If you want to use the actual zombie entity (not a player) you would need to use:
Im trying to make a command to if you get killed by a zombie you turn into a zombie so i made a zombie team and a objective that has killedbyteam.green
and i set the team color to green and when the score goes up you go to the zombie team but for some reason when i get killed by a zombie it does not increase my score and yes i have a command block that makes all zombies go to the zombie team i dont know what to do so im looking for some help
Could you post the commands that you have used thus far?
ok first i made a /team add zombie i then changed the team color to green
then i made a objective /scoreboard objectives add KilledByZombie killedByTeam.green
then i put this into a repeating command block team join zombie @a[scores={KilledByZombie=1}]
so when you get killed by zombies which i made another repeating command block that made all the zombies be on the zombie team
i think i got everything so if you get killed by a zombie you go to the zombie team
So there a few possible problems. First, you might not be tracked by the KilledByZombie score. You can test this by setting the display for KIlledByZombie to the sidebar. If nothing shows up then you can just add 0 to your score:
Second, you could be using actual zombies (the actual zombie entity). This would be a problem because I believe that the "killedByTeam.green" only tracks player kills (not mob kills even if they are part of the green team).
Third, you might have forgotten to add the player that's killing you to the green team. You could test this by adding that player to the KIlledByZombie score and looking at their name color (it should be green if they are on the green team).
Lastly, you could have a score higher than 1 already (which wouldn't trigger the team changing command because it only affects players with an exact score of 1)
If you want to use the actual zombie entity (not a player) you would need to use:
This would track anytime a player is killed by a zombie mob (if it doesn't work make sure to check with all the other possible problems).
ok that makes alot more since i did not know that entity's did not count thank you so much!
Im using this for a custom world im making so i will make sure to credit you