Enchanting custom armor breaks script

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

    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.

lowjector

Member
Nov 17, 2019
4
0
1
Hello, I recently created custom armor for a server. It works perfectly fine when it's not enchanted. However, when I enchant it the script completely stops working and it acts as if it's just regular leather armor. I can't see why this would happen.

My skript:

Code:
on damage:
    if victim is a player:
        set {_damage} to damage
        if victim is wearing leather chestplate named "&5Dragon Chestplate":
            set damage to ({_damage}*0.55)
            add -100 to victim's chestplate's durability
Thank you for helping.
 
Status
Not open for further replies.