I'm working on a skript which can teleport the player or another player (whom they hit) to a location of an arrow that the player shot
I don't get any errors but it doesn't work
Does anyone know why or can help me
Also im new to the forums so sorry if i do anything wrong :sob:
I don't get any errors but it doesn't work
Does anyone know why or can help me
Code:
on shoot:
if shooter is a player:
if projectile is an arrow:
if shooter's tool is bow:
if display name of shooter's tool is "&dVoid Bow":
set {TeleportArrow} to true
set {ArrowID} to 1
set shooter's held item to {VoidPortal}
on projectile collide:
if event-projectile is an arrow:
if {ArrowID} is set:
set {_Location} to event-projectile
set {StoredLoc} to {_Location}
on right click:
if player's held item is a diamond named "&dVoid Portal":
set {_tp} to uuid of player
if {Mana::%{_tp}%} is more than 25:
remove 25 from {Mana::%{_tp}%}
teleport player to {StoredLoc}
wait 1 second
delete {StoredLoc}
delete {ArrowID}
else:
stop
on damage of player:
if attacker's held item is a diamond named "&dVoid Portal":
set {_attacker} to uuid of attacker
if {Mana::%{_attacker}%} is more than 10:
remove 10 from {Mana::%{_attacker}%}
teleport victim to {StoredLoc}
wait 1 second
delete {StoredLoc}
delete {ArrowID}
else:
stop
Also im new to the forums so sorry if i do anything wrong :sob: