I want to make an elevator where a player is teleported 8 blocks above him, but I dont want to change the X and Z coordinates. I know I probably need to use /execute for that but I don't know how.
the ^ makes the coordinates relative to the player position
However, the detection of when to teleport the player is the tricky part, and there are more options than I care to list. The most common though, are detecting player coordinates, and detecting when a player is on a certain block. The way to do this depends completely on which version of Minecraft you are playing.
If you would let us know what version you are playing, someone will be able to help you out. If you happen to be playing 1.16.5, then I can help you.
tp ~ ~ ~ teleports relative to the executor, which will be the command block in this case. i'm not sure if i'm correct about this though, but just to be sure you will want to do /execute as @p run tp ~ ~8 ~
The Meaning of Life, the Universe, and Everything.
Join Date:
10/25/2021
Posts:
53
Member Details
Are you trying to do this with commands or build an actual elevator? There are a few actual elevators you can make using slime and honey blocks. I had one one time that was hidden behind some piston doors, and when you stepped in it took you ~20 blocks down to a secret lab.
I want to make an elevator where a player is teleported 8 blocks above him, but I dont want to change the X and Z coordinates. I know I probably need to use /execute for that but I don't know how.
To just teleport up 8 blocks, you only need:
/tp @p ^ ^8 ^
the ^ makes the coordinates relative to the player position
However, the detection of when to teleport the player is the tricky part, and there are more options than I care to list. The most common though, are detecting player coordinates, and detecting when a player is on a certain block. The way to do this depends completely on which version of Minecraft you are playing.
If you would let us know what version you are playing, someone will be able to help you out. If you happen to be playing 1.16.5, then I can help you.
Hope this helps,
Thom
teleport ~ ~8 ~
tp ~ ~ ~ teleports relative to the executor, which will be the command block in this case. i'm not sure if i'm correct about this though, but just to be sure you will want to do /execute as @p run tp ~ ~8 ~
Are you trying to do this with commands or build an actual elevator? There are a few actual elevators you can make using slime and honey blocks. I had one one time that was hidden behind some piston doors, and when you stepped in it took you ~20 blocks down to a secret lab.