Teleport Player after certain action
I was looking for a simple teleportation system that let players teleport after they do a certain action. My idea was to make players teleport after they drop a certain item. Currently I've got: /execute if entity @e[type=item,name="Iron Ingot" run teleport @p 100 64 100
. The problem with this however is that it teleports the player relatively closest to the command block, not the item obviously. How can I make the player closest to the item teleport to a certain coordinate?
Thanks
Solution 1:
execute at
shifts the command execution.
/execute at @e[type=item,…] as @p at @s run tp …
Also, the syntax of the command in your question has some errors.