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.

Can't remove effect from player

Discussion in 'Skript' started by PoetinNL, Jul 8, 2020.

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

    PoetinNL Member

    Jul 6, 2020
    Likes Received:
    Can somebody help me with this,
    I would like to remove the effect if a player unequips the helmet.
    The applying effect works, however removing it does not.
    I also get no errors, Can somebody explain to me whats wrong?

    (Btw, I know you can just use on equip events etc, but I like to use SKBee for it wich works fine)

    Code (Skript):
    2. on player armor change:
    3.     if new armor item is any helmet:
    4.         send "&a%player% equipped  a %new armor item%" to player
    5.         if getLevel(player's helmet,"test") > 0:
    6.             apply slowness 2 to player for 5 seconds
    7.     if old armor item is a any helmet:
    8.         send "&a%player% unequipped  a %old armor item%" to player
    9.         if getLevel(player's helmet,"test") > 0:
    10.             remove slowness from player
    --- Double Post Merged, Jul 8, 2020, Original Post Date: Jul 8, 2020 ---
    I found out why it doesn't remove the effect:

    Because getLevel(player's helmet,... is air because if old armor item is a any helmet: checks if the helmet is unequiped so they won't be wearing a helmet. So I basically need to change it to getLevel(old player's helmet
    Using SKbee

    But that isn't a thing, So how to fix it?
Thread Status:
Not open for further replies.

Share This Page