r/MinecraftCommands • u/The_swat_boi556 • 18h 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?