TransWikia.com

Kill a person when he enters a certain location

Arqade Asked on July 1, 2021

I want the player targeted by this target selector to be killed, but for some reason it doesn’t work. I’m sure the repeating command block is executing correctly, what could be wrong?

execute as @a[x=291,y=69,z=-209,dx=10,dz=10] run kill @s

One Answer

Use kill @p

Explanation:

@s kills the entity that is executing the command, which is the command block and the entity you're trying to target is not the command block

Meanwhile, @p targets the nearest player

And if you want to target y pos throughout the world, set dy to 255

Answered by Coder2195 on July 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP