-1

So I am making a function for a video, and I need a way to set a player's score to 1 when they kill a bat.

I was thinking I could just summon an invisible armor stand on every bat in the overworld, and use that to detect if a bat died near a player. However that could be very buggy, and may lag some users games.

Anyone got any alternatives?

1

You can create an objective with the minecraft.killed:minecraft.bat which will automatically increment each time you kill a bat.

/scoreboard objectives add batKills minecraft.killed:minecraft.bat
  • I had no idea the objective existed, thank you! – Smart_Snake Feb 2 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.