#Teleporting Skript
1 messages · Page 1 of 1 (latest)
doorclub [0/2 Booked] DM me! suggests that you read this embed @dusky dune
Code blocks make it easier for helpers to identify potential errors -- help them help you!
```vb
on chat:
broadcast "This is how you format code!"
```
on chat:
broadcast "This is how you format code!"
On US keyboards, the grave character (`) is located above the tab key on the top left of the keyboard
On right click:
if player is holding diamond shovel named "Aspect of the Void":
loop all blocks in radius 1 of target block:
if loop-block is air:
teleport player to loop-block```
the yaw is only working when i facing positive X
also, how do i make it so it only teleports me 8 blocks forward
On right click:
if player is holding diamond shovel named "Aspect of the Void":
cancel event
loop all blocks in radius 1 of target block:
if loop-block is air:
set {_yaw} to player's yaw
teleport player to loop-block
set player's yaw to {_yaw} ```
set {_location} to location 1 block above {_location}
set pitch of {_location} to player’s pitch
set yaw of {_location} to player’s yaw
teleport player to {_location} ```
Np 👍
This can tp u in blocks tho
So it would be better if u did a raycast
Or just target block
how can i stop it from teleporting me into blocks
Can't understand this condition/effect: set yaw of {_location} to player’s yaw
and pitch
@kind yarrow
Just remove those two lines
And you can just target block
And then check the distant
could you give me an example, @kind yarrow?
On right click:
if player is holding diamond shovel named "Aspect of the Void":
cancel event
set {_location} to location 8 blocks in front of player
set {_location} to location 1 block above {_location}
teleport player to {_location} ```
set {_location}'s pitch
or something like that
whats the "if" to check if a player is crouching
check docs
kk
On right click:
if player is holding diamond shovel named "Aspect of the Void":
cancel event
if player is sneaking:
set {_location2} to target block
set {_location2} to location 1 block above {_location2}
teleport player to {_location2}
if player is not sneaking:
set {_location} to location 8 blocks in front of player
set {_location} to location 1 block above {_location}
teleport player to {_location} ```
the "if player is sneaking" section faces me towards 0,0
^
Ok set the yaw and pitch
it doesnt do it for the second one thoug
set {_location}'s yaw
Can't understand this condition/effect: set {_location2}'s yaw
Set {_location} yaw to player’s yaw
that doesnt work either
Was ther errors
what was the error
and where did you put it
the pitch and yaw sets have to be before the teleport