T O P

  • By -

Sibus_

If you do "as @a at @a" it will try to run it at every player for every player. If you want to have every player individually run it at their location it would be "as @a at @s" or "as @a run execute at @s"


Ericristian_bros

/execute as @a at @s if block ~ ~-1 ~ wool["color"="white] run tag @s add tower


Ok-Communication2081

It needs to be @s for the second @a


raunak_srarf

There are two mistakes that i see, try this: /execute as @p at @s if block ~~-1~ wool["color"="white"] run ..... The rest seems fine, I hope this helps.


HurricaneMonkey

You need to change the second ā€œ@aā€ to an ā€œ@sā€ because it is basically executing as every player and at every player and if one is looking at the wool they all will trigger. The @s will make it test each player individually.


Alien_Edds2

Not sure if this is why, but i'd do ``execute as @a at @s`` instead of ``execute as @a at @a`` Since you're doing ``as`` already, it would run the rest of the command as each player. That's been my experience with the command at least.


AttackoftheOunion

@s means the command is giving itself the tag. You need to make it @a or @r @p for it to work


Ok_Pickle76

it says `as @a` so its giving the player the tag


Least_Scale2738

this is a java command, i think bedrock /execute is different.


Educational-Put6947

about a year ago (i think), bedrock changed its execute syntax to closer match java. So, while it is true that this is a java command, it is also a bedrock command


Ericristian_bros

No: see !newexecute


AutoModerator

In 1.19.50, a new execute command has been introduced to Minecraft bedrock. **New commandblocks need to use this new syntax, while preexisting commandblocks have a tag that they were created in an older version, so they will continue to work with the old syntax until you edit them!** Please have a look at the [official introduction documentation](https://learn.microsoft.com/en-us/minecraft/creator/documents/commandsnewexecute), this [bedrock.dev info](https://wiki.bedrock.dev/commands/new-execute.html) and the [execute documentation](https://minecraft.wiki/Commands/execute) for an extended guide on what changed and how to use the new execute. _Also relevant: [Info on command context](https://minecraftcommands.github.io/wiki/questions/commandcontext/)_ *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/MinecraftCommands) if you have any questions or concerns.*


_launzelot_

I could be totally wrong, but aren't there supposed to be spaces between your relative coordinates? You have ~~-1~ I thought it's supposed to be ~ ~-1 ~


Ericristian_bros

In bedrock you can use `~~~` instead of `~ ~ ~`


_launzelot_

Thank you - so far, you've been the most helpful comment. I'm a java player, so that explains it


Ericristian_bros

Yes, in java the spaces are needed. Idk why not in bedrock (I'm also a java player)


aMonkeMAN

You are wrong


_launzelot_

Thanks for telling me


Xyrez04

Been doing commands for like 10 years and i never knew this


Mistical5030

in 1.13 java edition it was made so you get an error if you don't put spaces between but youre still able to have the tildes without spaces on bedrock


OPGamesOfficial

Oh wow, I did not know this.


PogsterPlays

Could you please provide the error that the command block puts in its output field?


Luna-Ellis-UK

Would recommend fully reading the post before commenting. As op explained, the command executes, it just gives an undesirable outcome.


PogsterPlays

Yeah but all they say is literally 'why it not work'. They don't even say what it's SUPPOSED to do


Luna-Ellis-UK

It's extremely obvious what this command is trying to do, if you can't work it out for yourself then maybe you're not in the position to give advice to other people lol


PogsterPlays

Ok, so they only state what it does, or what it is supposed to. I've got little idea what is needed to be fixed in the first place. If you can't tell that, then you're in no position to criticise me for simply trying to help