Arqade Asked by zénó hudák on July 27, 2021
How can I use the command
execute as @a[scores={health=<number>}] at @s run tp <coordinates>
with multiple lives? For example, in the command
execute as @a[scores={health=1}] at @s run tp 0 10 0
do not teleport only when it has 1 hp but teleport when it has less than 10 or 4 to 10 hp.
Assuming you already have the scoreboard objective for health set up, you can check for values in a range using min..max
, for example, if you want to execute at all players with less than 10 (9 or less), you would use @a[scores={health=..9}]
as the selector.
To disable someone from jumping, you can give them jump boost 128 with /effect give Player jump_boost 10 127
Correct answer by Authom on July 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP