Skript-GUI on click event

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

    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!

Darth_Maus

Member
Mar 28, 2022
3
0
1
I can't seem to figure out, how to read if an item is clicked in the gui how to change something in it (like close it in this example). I use skript-gui


Code:
command /opengui:
    trigger:
        create a gui with virtual chest inventory with 3 rows named "GUI" and shape "xxxxxxxxx", "xx-xxx-xx", and "xxxxcxxxx":
            make gui slot "x" with gray stained glass pane named "&8&l---"
            make gui slot "c" with barrier named "&c&lClose"
        open the last gui to player
on inventory click:
    if item is barrier named "&8&lClose":
        close gui of player

Error:

Code:
Line 9: (gui.sk)
You can't use 'gui' outside of a GUI make or open/close section.
Line: close gui of player
 
Last edited: