#why does my skript not work

1 messages · Page 1 of 1 (latest)

red snow
#

I made a skript for a "thorns shield" that damages the attacker when blocking their attacks with it. But for some reason it doesnt do anything when you block their attacks but also gives no errors
Skript:

    victim is blocking:
        if victim's off hand tool is a shield named "&2&lThorns Shield" with lore "&7It will &cdamage &7the player by &c0.5&7 hearts" and "&7every time you &9block&7 their &cattack":
            damage attacker by 0.5 hearts```
jaunty bone
mental ingot
onyx saffron
red snow
#

ok

red snow
#

i tried to debug it and now it works but only on the first time the shield gets damagedon damage of player: victim is blocking: set {_v} to victim set {_a} to attacker send "%victim's off hand tool%" to victim if {_v}'s off hand tool is a shield named "&2&lThorns Shield": send "test" to victim damage {_a} by 0.5 hearts

#

does any one know why

#

i fexed it

#

fixed

#
    victim is blocking:
        set {_v} to victim
        set {_a} to attacker
        set {_s} to victim's off hand tool
        if {_v}'s off hand tool is {_s}:
            damage {_a} by 0.5 hearts```
red snow
#

nvm

red snow
#

I finnaly did it!