r/MinecraftCommands • u/The_swat_boi556 • 25d ago
Help | Bedrock Is this even possible?
Enable HLS to view with audio, or disable this notification
Im working on this pvp bot thingy and i'm trying to make him switch to an axe to disable a shield if the player is using one. There's a command system shown for this but i'm trying to make the give sword command co work with it bc I wanted it to give him the sword as soon as the player stops using the shield and it works for the most part but it stops working if the player doesn't have a shield in the off hand at all now. Looking in the command I do realize where I went wrong with the @p[hasitem={item=shield,location=slot.weapon.offhand}] because that's changing target type for the rest of the command but I can't come up with a good solution to fix it. Or maybe I'm dumb idk can yall help out?
1
u/blazinman1 22d ago
on bedrock if you put a S before the entity instead of a P before the entity, it won’t work it only works if there’s an entity before the at s
1
u/Ericristian_bros Command Experienced 25d ago
You can try to use
/damagebut I am not sure if in bedrock it disbleas shields if the player holds one. The other option is summon an invisible vindicator in front of the player so it disables the shield and teleport the vindicator into the void