Jump to content

On right click event with multiple items not working.


Ikey

Recommended Posts

Hey. On my crates skript I have noticed a rise in glitches, mostly being when you try to right click on the block with the key, if the key is in a stack of more than 1 it will not think that the key is a key.

Here is my code:

on right click:
   if "%region at player%" contains "crates":
      if event-block is chest:
         if name of player's held item is "&a&lPlaytime Crate Key":
            cancel event
            remove 1 of event-item from player's inventory

Is there any way to make it so that if the player has over 1 of the item, it will still register as the item and not some other item.

Owner of ikeysurviv.minehut.gg

 

⊱------------------------------⊰

[LEGEND] on Minehut

⊱------------------------------⊰

In-game name - ikeyIX

Discord name - ikeyIX#2007

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...