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.
And code below is to teleport to the location set.
For reference(short video)
https://drive.google.com/open?id=12GxEj07IWZxU2aAN6jR_cSbvYdiRvf3y
Sorry for my bad English.
Waiting for your reply.
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: