Keycards script error help

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

Plav

Member
Dec 18, 2022
14
1
3
26
So I have a script that makes keycards open doors on right click, but I always get the error
Line 2: (keycard .sk)
event-block is not a world
Line:block data tag "open" of event-block = false:

I was hoping someone could help me fix this

Code:
on right click on iron door:
    block data tag "open" of event-block = false:
        cancel event
        block 3 blocks under event-block is lime wool:
            lore of player's tool contains "&1| &9Security I":
                activate event-block
                play sound "block.iron_door.open" at event-block for player
                send "&aAccess GRANTED!"
                wait 2 seconds
                deactivate event-block
                play sound "block.iron_door.close" at event-block
            else:
                play sound "block.note_block.guitar" at pitch 0.8 at event-block for player
                send "&cAccess DENIED! &7(Security I&7)"
 
Last edited: