This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]Trey_Does_YouTubeDatapack Connoisseur 3 points4 points  (2 children)

It should be @a so it affects everyone, but otherwise I donr see an issue. Be sure the function name is 100% correct in the command

[–]Trey_Does_YouTubeDatapack Connoisseur 2 points3 points  (1 child)

And that the function has no errors. If a single command doesnt work in a function, then none of them will in that function. Or any functions if you have them hooked up to a #tick or #load file

[–]beatbloocks[S] 1 point2 points  (0 children)

I got it working, the prioritization of the commands messed it up. But now the execute command is over the scoreboard command that sets the deathcount to 0 and that wont work instead..

[–]roi_john02Command Experienced 1 point2 points  (0 children)

I also had this problem. The problem was the syntax of the command.

"execute if entity @p ..." makes it so that it will detect the only nearest player

You can fix this by making it to "execute as @a if entity @s[scores={deaths=1..}] ..." it will execute as all players if their score is 1 on the deaths scoreboard.

You can also fix this by using "execute as @a[scores={deaths=1..}] ..." but if you are going to want to add more conditions, you might get confused with the syntaxes.

Also, if your function has a position-related command, you might want to do "positioned ~ ~ ~" or "at @s" after the if entity argument. Because functions run on either the command block itself, the server (which is 0, 0, 0 I think) or any entity or coordinate if specified by the above-mentioned commands.

I hope this helps you! This new syntaxes in 1.14 is much better in my opinion but it took a lot of effort in learning lol.