If event-slot is 11

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

Zodie

New Member
Dec 2, 2023
5
0
1
image_2024-09-03_202210597.png


I'm trying to create a gui with 3 buttons, and when you click on the tripwire hook the inventory should close, (for now)
When i use this exact skript for any of the empty slots it works, but when it's one of the slots with items, the skript is reloading successfully but nothing happens when I click that slot, (I know how the chest format works, (slot 1 is 0, 2 is 1, etc,)


Code:
on inventory click:
    if name of player's inventory contains "&c&lGuide":
        clicked slot = 11:
            close player's inventory
 
Same issue, it works with any other slot except those 3 with items in them

Code:
on inventory click:
    if name of player's inventory contains "&c&lGuide":
        index of event-slot = 11:
            close player's inventory