Can't remove effect from player

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

PoetinNL

Member
Jul 6, 2020
2
0
1
23
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_language.skript:
on player armor change:
    if new armor item is any helmet:
        send "&a%player% equipped  a %new armor item%" to player
        if getLevel(player's helmet,"test") > 0:
            apply slowness 2 to player for 5 seconds
    if old armor item is a any helmet:
        send "&a%player% unequipped  a %old armor item%" to player
        if getLevel(player's helmet,"test") > 0:
            remove slowness from player
[doublepost=1594245704,1594241616][/doublepost]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?
 
Status
Not open for further replies.