how can you use the summon command or setblock command with players cordinates

//ads -- adsterra.com -- native banner
?>
i was trying to make a fake skeleton and i came in the problem he coudnt shoot arrows because the player runs away i want to summon them next to the player or make blocks right behind the player so can you help me by saying how to do so
Best Answer
To execute commands around a specific target use the execute command.
/execute <Target> <X> <Y> <Z> <Command>
In this case
/execute @a ~ ~ ~ summon Skeleton
Pictures about "how can you use the summon command or setblock command with players cordinates"



How do you use the Setblock command?
How to Enter the CommandHow do you spawn in coordinates in Minecraft?
You can teleport to any location as long as you have its coordinates. To do it, type your command like this: /tp X Y Z. So for example, if you're trying to teleport to the location 70, 70, 70, you'll type: /tp 70 70 70.How do you find the coordinates of a command block in Minecraft?
Use any player's username (or @p @a and @r ) and then a ^ to specify a player's coordinates. Add a number after it to specify an amount above or below the player.How do you use relative coordinates in Minecraft?
Relative positions are denoted by a ~ (tilde) symbol before each of the three numbers that make up the three-coordinate (~X, ~Y, ~Z) position. Minecraft players are two blocks tall, so (~0, ~0, ~0) represents the player's feet and (~0 ~1 ~0) represents the player's head.Using Commands in Minecraft: How to Use /setblock \u0026 /fill to Alter Terrain! | 1.11.2
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Sora Shimazaki, Vanessa Loring, Ivan Babydov