1

Basically, I am trying to make a system so that when a player dies a dead body (armour stand with team colour) spawns 1 Block underneath the death spot so that when it is lying on the ground the legs are hidden.

I tried to use this command in my setup:

/execute as (player_placeholder) run tp @e[distance=..150,type=minecraft:armor_stand,name=Corpse] ~ ~-1 ~

but it only teleports my armour stand to the command block and not to my friend (player_placeholder).

Could someone tell me why or maybe find a different solution for my plan?

1
  • If the answer doesn’t work, then it is most likely a selector issue. What is the selector in place of (player_placeholder) after the execute as? Jan 8, 2021 at 17:54

1 Answer 1

1

The as subcommand only changes the executing entity, but the position does not change, meaning the position will still be at the previous executing entity. You need to use at @s to move the position to the target entity. Like this:

execute
  as (selector)
  at @s
run
tp @e[distance=..150,type=minecraft:armor_stand,name=Corpse] ~ ~-1 ~

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .