How to teleport while facing air?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

NameKun

Member
Mar 3, 2020
11
0
1
19
Hello.
I'm creating a function that teleport player by skript.

LIKE THIS:
If player clicked specified sign, player's teleportation point would be set.
And then, if player clicked slime ball that player has, player will teleport to the location set just now.

However, it did not work when player clicked a slime ball with facing the air.
(Of course, if player faces ground, it works correctly.)

So can you let me know why player cannot teleport while facing the air?

The code is below

Code below is to set the teleportation point.
Code:
on rightclick:
    block is a sign
    line 1 of clicked block is "&a-|-&4CheckPoint&a-|-"
    set {point.%player%.%world%} to location of player
    message "<gold>Your checkpoint was saved!"
    command "/execute at %player% run playsound minecraft:block.note_block.bell master %player% ~ ~ ~ 1"

And code below is to teleport to the location set.
Code:
on rightclick with slime ball:
    if clicked block is sign:
        stop
    if {point.%player%.%world%} is not set:
        message "&cYour checkpoint is not set!"
    else:
        teleport player to {point.%player%.%world%}

For reference(short video)
https://drive.google.com/open?id=12GxEj07IWZxU2aAN6jR_cSbvYdiRvf3y

Sorry for my bad English.
Waiting for your reply.
 
Last edited:
Status
Not open for further replies.