Quick and basic intro - I'm creating a skript to create a pet name "Orbix" that follows you around, but I can't get the command to remove the pet to work. It simply doesn't do anything. Here's my code:
Code:
command /orbixon:
trigger:
spawn an armor stand at location behind the player
set {_orb.%player%} to spawned armor stand
add "{CustomNameVisible:1,NoGravity:4b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_orb.%player%}
set name of spawned armor stand to "&7%player%&7's &b&lOrbix"
set {_head} to "Variable" parsed as offlineplayer
set helmet of spawned armor stand to skull of {_head}
while {_orb.%player%} is alive:
if distance between player and {_orb.%player%} is greater than 1:
teleport {_orb.%player%} behind the player
wait a tick
command /orbixoff:
trigger:
delete {_orb.%player%}
send " "
send "&7&oOrbix transfers his essence into your body as he dissapears..." to player
send " "