Solved Armor Stand Problem

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

Daskomiko

New Member
Apr 23, 2021
6
0
1
24
Hey, I have a problem: I placed an armor stand and with the following script I wanted to execute a command with it. But it doesn't work, why? Here is my code:

Skript:
Code:
on right click on a armor stand:
    send "test message"
    player's world = "world":
        send "test message"
        if name of event-entity is "&4Adventskalender":
            send "test message"
            cancel event
            execute player command "cp advent"

Armor Stand:
Code:
/summon armor_stand ~ ~ ~ {Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,ShowArms:1b,ArmorItems:[{id:"leather_boots",Count:1b,tag:{display:{color:1799437}}},{id:"leather_leggings",Count:1b,tag:{display:{color:1799437}}},{id:"leather_chestplate",Count:1b,tag:{display:{color:11015717}}},{id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;-1737552557,1684161468,-2105557318,-1694640140],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTRlNDI0YjE2NzZmZWVjM2EzZjhlYmFkZTllN2Q2YTZmNzFmNzc1NmE4NjlmMzZmN2RmMGZjMTgyZDQzNmUifX19"}]}}}}],HandItems:[{},{}],CustomName:'{"text":"Adventskalender","color":"dark_red","bold":"true"}',CustomNameVisible:1b,Pose:{Head:[4f,0f,0f],LeftLeg:[14f,0f,0f],LeftArm:[292f,10f,0f],RightArm:[288f,341f,8f]}}

The armor stand isn't even really recognized. Thanks for helping
 
Hey, I have a problem: I placed an armor stand and with the following script I wanted to execute a command with it. But it doesn't work, why? Here is my code:

Skript:
Code:
on right click on a armor stand:
    send "test message"
    player's world = "world":
        send "test message"
        if name of event-entity is "&4Adventskalender":
            send "test message"
            cancel event
            execute player command "cp advent"

Armor Stand:
Code:
/summon armor_stand ~ ~ ~ {Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,ShowArms:1b,ArmorItems:[{id:"leather_boots",Count:1b,tag:{display:{color:1799437}}},{id:"leather_leggings",Count:1b,tag:{display:{color:1799437}}},{id:"leather_chestplate",Count:1b,tag:{display:{color:11015717}}},{id:"player_head",Count:1b,tag:{SkullOwner:{Id:[I;-1737552557,1684161468,-2105557318,-1694640140],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTRlNDI0YjE2NzZmZWVjM2EzZjhlYmFkZTllN2Q2YTZmNzFmNzc1NmE4NjlmMzZmN2RmMGZjMTgyZDQzNmUifX19"}]}}}}],HandItems:[{},{}],CustomName:'{"text":"Adventskalender","color":"dark_red","bold":"true"}',CustomNameVisible:1b,Pose:{Head:[4f,0f,0f],LeftLeg:[14f,0f,0f],LeftArm:[292f,10f,0f],RightArm:[288f,341f,8f]}}

The armor stand isn't even really recognized. Thanks for helping
you cant cancel a click event
 
pretty sure your supposed to write
Code:
make player execute command "/cp advent"
 
Code:
execute player command ""
needs to come with an / in the start like
Code:
execute player command "/thecommand"
also you can't cancel a click but what you can do is to type "stop" and the event wont continue checking/doing something

and on your amorstand code you how couple of " so skript thinks some of the text is code of you closing and opening new string value, a way to fix it is to put double " on the string, here is an example:
not fixed:
Code:
"{nbtsomething:name:"somename"}
fixed:
Code:
{nbtsomething:name:""somename""}
 
Status
Not open for further replies.