I'm trying to make my friend Bee get the weakness potion effect every time she goes 20 blocks near my other friend Kay.

How do I do this with command blocks?

1 Answer 1


From looking at the wiki:

execute @a[name=Kay] ~ ~ ~ execute @a[name=Bee,rm=0,r=20] ~ ~ ~ effect @s weakness <time> <amplifier>

Which translates to:

Execute at Kay, as Bee if closer then 20 blocks (inclusive), give them (Bee) an effect

You must log in to answer this question.

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