Hello, I am trying to make a command that opens a GUI of arg-1's armor, but I want it so when I click on the armor inside the GUI, arg-1's armor gets removed. I am getting errors though.
Skript:
command /viewarmor <player>:
trigger:
set {_viewarmor_} to a new chest inventory with 1 row with name "&cPlayer's Armor"
open {_viewarmor_} to player
set slot 0 of {_viewarmor_} to arg-1's helmet
on inventory click:
if name of event-inventory is "&cPlayer's Armor":
set arg-1's helmet to air
Errors: The expression 'argument' can only be used within a command (inventory.sk, line 9: set arg-1's helmet to air)
Please type the correct skript if you know.
[doublepost=1609191954,1609190135][/doublepost]I'm also having trouble giving the player armor through the GUI
Skript:
command /viewarmor <player>:
trigger:
set {_viewarmor_} to a new chest inventory with 1 row with name "&cPlayer's Armor"
open {_viewarmor_} to player
set slot 0 of {_viewarmor_} to arg-1's helmet
on inventory click:
if name of event-inventory is "&cPlayer's Armor":
set arg-1's helmet to air
Errors: The expression 'argument' can only be used within a command (inventory.sk, line 9: set arg-1's helmet to air)
Please type the correct skript if you know.
[doublepost=1609191954,1609190135][/doublepost]I'm also having trouble giving the player armor through the GUI