Armor stand helmet not working

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

Andreas

Member
Mar 28, 2020
20
0
1
55
Alright so I have this problem where I can't get it to spawn dirt when I type in /spawnas dirt. It doesn't spawn anything and I tried changing "set {_2} to arg-1" to "set {_2} to dirt" and that worked. Please help me, thanks.


Code:
command /spawnas [<text>]:
    trigger:
        set {_1} to location of player
        set {_2} to arg-1
        spawn armor stand at {_1}
        wait 1 tick
        set armor stand helmet of last spawned entity to {_2}
        set {_3} to last spawned armor stand
        add "{ShowArms:1,NoGravity:1b,Invisible:1,Invulnerable:1,NoBasePlate:1}" to nbt of {_3}
        send "%{_1}%"
        send "%{_2}%"
        send "%{_3}%"
 
Try this

Code:
command /spawnas [<text>]:
    trigger:
        set {_1} to location of player
        set {_2} to arg-1 parsed as item
        spawn armor stand at {_1}
        wait 1 tick
        set armor stand helmet of last spawned entity to {_2}
        set {_3} to last spawned armor stand
        add "{ShowArms:1,NoGravity:1b,Invisible:1,Invulnerable:1,NoBasePlate:1}" to nbt of {_3}
        send "%{_1}%"
        send "%{_2}%"
        send "%{_3}%"
[doublepost=1600855404,1600855362][/doublepost]The reason it didn't work was because you made it wear a text, not an item/block
 
Status
Not open for further replies.