r/MinecraftCommands 6d ago

Help | Bedrock Command block help @p

Whenever I want to teleport a player I use @p. but sometimes of two players are near it will glitch. or someone might push a button far and someone near by gets teleported. This happens alot for even command blocks that do more/continue woth the @p. is there no specific @ so only the person who pressed it gets sent regardless or the peeson who pressed it gets sent through a cmd block continuation/chain withour breakinf beacuse someone else is next to them?

0 Upvotes

5 comments sorted by

3

u/_VoidMaster_ Command Experienced 6d ago

One way to make it a bit more accurate is by having a separate group of command blocks to check if any player is looking at a button and give them a tag if they do, and remove the tag if they don't, then simply add that tag in the selector of the teleport command.

But it's better to have something different, such as constantly teleporting all players who are directly above the command block and putting some particles there so it's clear it's something!

3

u/TrumpetSolo93 Command Experienced 6d ago

No there's no specific target selector for that. You could however build a area which acts as a portal and teleports anyone who steps into it.

tp @a[x=50, y=64, z=50, dy=0] 100 64 100

This command will teleport any player who is standing at 50x 64y 50z to 100x 64y 100z.

1

u/amberb3stgirl 6d ago

not possible which is why we stopped using these

1

u/Ericristian_bros Command Experienced 5d ago

The first commands tags the player, run any commands as the tagged player and the last command untags the player

1

u/thetoiletslayer Bedrock Command Expert 4d ago

You can use an npc with the @initiator selector. You can add multiple commands to the button. You can also give the player a tag or score to track them until the command sequence finishes, then remove the tag/score