1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Door Key

Discussion in 'Skript' started by bpitcher2013, Aug 24, 2020.

Thread Status:
Not open for further replies.
  1. bpitcher2013

    bpitcher2013 Member

    Joined:
    Jan 25, 2020
    Messages:
    14
    Likes Received:
    1
    Im trying to make a key for a door but its not working it says i made it correctly

    command /key2:
    trigger:
    give 1 tripwire hook with lore "&7House Key2" named "&6&lKey2" to player
    wait 3 ticks
    stop trigger

    on rightclick on iron door:
    if player is holding a tripwire hook with lore "&7House Key2" named "&6&lKey2":
    if location of clicked block is location -691, 94, -400 in world "world":
    toggle event-block
    if player is not holding a tripwire hook with lore "&7House Key2" named "&6&lKey2":
    cancel event

     
    #1 bpitcher2013, Aug 24, 2020
    Last edited: Aug 24, 2020
  2. Best Answer:
    Post #3 by Mich, Aug 29, 2020
  3. ser

    ser Member

    Joined:
    Aug 28, 2020
    Messages:
    3
    Likes Received:
    0
    errors?
     
  4. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
    Please use the help format next time
    I find the problem and I have bad news
    Code (Text):
    1. command /key2:
    2.     trigger:
    3.         give 1 tripwire hook with lore "&7House Key2" named "&6&lKey2" to player
    4.  
    5. on rightclick on a left-hinged closed top iron door:#use the on rightclick event with the %clicked block% to know the exact name
    6.     message "yes" #use this to know if the event is working
    7.     #you can try to set the exact coordinates again but I am bad with coordinates
    8.     if player is holding a tripwire hook named "&6&lKey2" with lore "&7House Key2":
    9.         toggle event-block
    10.     else if player is not holding a tripwire hook named "&6&lKey2" with lore "&7House Key2":
    11.         message "You need a key"
    12.  
    13. on rightclick:
    14.     send "&5%clicked block%" to player#you will need this to know the name of the door
     
    #3 Mich, Aug 29, 2020
    Last edited: Aug 29, 2020
Thread Status:
Not open for further replies.

Share This Page

Loading...