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!


    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.

On region exit: not working

Discussion in 'Skript' started by Gamingwng, Apr 24, 2020.

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

    Gamingwng Member

    Apr 23, 2020
    Likes Received:
    So I'm writing this skript where when a player dies, they get into spectator mode. After that, if they try to leave the region "spleef", the event gets canceled, so that they can't leave the region. Everything is working except the part where they can't leave the region. It gives an error saying "can't understand the event 'on region exit'"

    Here is the code:

    Code (Text):
    1. on region exit:
    2.     if "%event-region%" contains "spleef":
    3.         if {spleefgame} is true:
    4.             cancel event
    5.         stop
    I also tried using %region% instead of %event-region% but I had no luck with that.

    I even tried the following:
    Code (Text):
    1. on region exit:
    2.     send "test" to player
    Any help would be appreciated :emoji_slight_smile:

    Edit: I have the latest versions of skript, WorldGuard and FAWE
  2. IDuckz_

    IDuckz_ Active Member

    Jul 25, 2019
    Likes Received:
    "Latest" is not a version, tell me your current skript version, not "latest"

    Edit: on region exit: event works for me, my skript version is 2.2dev36 if your wondering.

    More Edit: Once you fix your skript version, you can use this example:

    Code (Text):
    1. on region exit:
    2.     if "%event-region%" contains "<the region player is at>":
    3.         cancel event
    4.         send "You cannot leave! HAHAHAHA"
    #2 IDuckz_, Apr 24, 2020
    Last edited: Apr 24, 2020
Thread Status:
Not open for further replies.

Share This Page