Solved Door Key

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

bpitcher2013

Member
Jan 25, 2020
14
1
3
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
 
Last edited:
Please use the help format next time
I find the problem and I have bad news
Code:
command /key2:
    trigger:
        give 1 tripwire hook with lore "&7House Key2" named "&6&lKey2" to player

on rightclick on a left-hinged closed top iron door:#use the on rightclick event with the %clicked block% to know the exact name
    message "yes" #use this to know if the event is working
    #you can try to set the exact coordinates again but I am bad with coordinates
    if player is holding a tripwire hook named "&6&lKey2" with lore "&7House Key2":
        toggle event-block
    else if player is not holding a tripwire hook named "&6&lKey2" with lore "&7House Key2":
        message "You need a key"

on rightclick:
    send "&5%clicked block%" to player#you will need this to know the name of the door
 
Last edited:
Status
Not open for further replies.