What command do I need for this?

Po
3

In Minecraft I want to have a command that permanently teleports an armor stand at a certain distance from a moving lore. Does anyone know what command I need and how I should phrase it?

gl

What do you mean by a certain distance?

Do you think the Armorstand teleports a couple of blocks every 10 milliseconds (or so) towards the lore?

Po

E.g. A block next to the lore. Without delay.

gl

Oh, you mean that the Armorstand should always be a block behind the lore? So you need a day for the Armorstand and for the lore. To do this, look at the lore and type / tag (without pressing Enter) and then press Tab to write the ID of the lore into the command in the command. And then you write "Lore" behind it, for example. You can write anything no matter, the main thing you remember that. You do the same with an Armorstand. Then you have to write the following command in a repeat command block that is always active:

/ execute positioned as [ArmorstandID] unless entity @e [tag = Lore, distance = .1]

Then you place a comparator on this command block so that the rear part of it is facing the command block. Then you put an amplifier directly on the comparator and in the same direction. On this amplifier you put another command block (normal), which says:

/ tp [ArmorstandID] ~ ~ ~ facing [LoreID]

And right after that a second command block (also normal):

/ tp [ArmorstandID] ^ 0.5

There's no typo in all commands.