TransWikia.com

How to teleport player 5 blocks in front of them with command blocks

Arqade Asked on August 31, 2021

I’ve been trying to create a command block where the player places down a spawn egg and they will be teleported in front of them. I have already figured out the spawn egg part but I can’t figure out the teleport part. (Also the spawn egg is a chicken)

One Answer

Your command is the following.

execute as <selector> at @s run tp ^ ^ ^5

That will teleport you 5 blocks in front of you. The ^ are used for cords relative to what your head rotation is. The first ^ is for left/right. The second is for up/down(positive being up and negative being down). The last one is for forward/backward(positive being forward and negative being backward). Remember, these are relative to what your head rotation is. Make sure to execute the to command as the entity you want to tp.

Correct answer by randomuser922 on August 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP