Solved Remove armorstand on click?

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

Gecky

Member
May 22, 2019
15
0
0
36
Hey so I am trying to make it so when you click on an armorstand (it is invisible) the skript will remove the armorstand and do something, will use send for example. This is what ive got but I have no clue how to make it actually work...?

on rightclick on armor stand:
loop entities in radius 5 of player:
loop-entity is armor stand
kill loop-entity
send "hi"
 
This works for me, just tested it:
code_language.skript:
on rightclick on entity:
    if "%event-entity%" is "armor stand":
        kill event-entity
        # DO STUFF
 
The removing of the armorstand worked but when I have it run a command to open a gui, the gui is empty. The gui when done through manual commands does work.

(Also doesn't work when I add something like 'send "test"'

Code:
on rightclick on entity:
    if "%event-entity%" is "armor stand":
        kill event-entity
        execute console command "/openbag %player% 1"

Code:
command /openbag <player> <text>:
    trigger:
        if arg 2 is "1":
            open chest with 3 rows named "&6&lDungeon Loot" to arg 1
            set slot 0 of current inventory of player to diamond
 
The removing of the armorstand worked but when I have it run a command to open a gui, the gui is empty. The gui when done through manual commands does work.

Code:
on rightclick on entity:
    if "%event-entity%" is "armor stand":
        kill event-entity
        execute console command "/openbag %player% 1"

Code:
command /openbag <player> <text>:
    trigger:
        if arg 2 is "1":
            open chest with 3 rows named "&6&lDungeon Loot" to arg 1
            set slot 0 of current inventory of player to diamond

code_language.skript:
set slot 0 of arg 1's current inventory to diamond

Mark as solved, please. If you have questions about something else, make another post.
 
Status
Not open for further replies.