Help with creating a simple skript

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

TheModz01

Member
Oct 27, 2019
1
0
0
24
Hi, I have been trying to create a script in which when someone right clicks the pickaxe to open the menu and change the item quickly, it will return to the pickaxe...

Skript Version: 2.4-alpha4
Minecraft Version: 1.12.2

Full code:
Code:
on player item held changing:
    if player is holding any pickaxe:
        cancel event

It doesn't give me any error, what it does now, is every time you have the pickaxe in your hand and try to change the slot, it returns you to the pickaxe, this is fine, but it should only be when you right click the pickaxe, not always.
 
You need to add the "on right click with <item>" event to it somewhere.

Such as:
Code:
on right click with any pickaxe:
  if player is holding any pickaxe:
    cancel event
No clue if this will work, but'll work something along those lines, assuming you know what I mean.
 
Status
Not open for further replies.