spawn armor stand behind player

  • 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!

Kitty_cre

Member
Jul 12, 2023
3
0
1
104
function spawnpet(p: player, pet: text, equip: number):

set {_a} to nbt compound from "{NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583,Marker:1b}"
set {_n} to nbt compound from "{CustomNameVisible:1,}"
spawn armor stand {_equip} blocks behind {_p} with nbt {_a}
set {_as} to last spawned armor stand
set {_as}'s helmet to {petlist::%{_pet}%}
set name of {_as} to {petname::%{_pet}%}
add {_n} to nbt of {_as}
add {_as} to {petshown::%{_p}%::*}
while 1 is equal to 1:
set {_asl} to location {_equip} blocks behind {_p}
teleport {_as} to location at {_asl}
wait 1 tick



when the armor stands are teleported behind the player they are teleported behind the players head