Can someone please help

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

Picasmet

Member
Apr 2, 2025
4
0
1
Im trying to make a custom item on a server and everything works EXCEPT for the applying strength portion. Am i doing something wrong?
I have some other items that apply potion effects but they all work fine.

Code:
on right click:
    if player is holding a cooked mutton named "&c&lMeat Shank":
        if player's health > 1:
            set {_shankdamage} to (player's health / 2)
            damage player by {_shankdamage} hearts
            set {rightClickDamage.%player%} to true
        else:
            send "&7&oNot enough health!" to player
            delete {rightClickDamage.%player%}
            
on damage:
    if damage was caused by custom:
        if victim is holding a cooked mutton named "&c&lMeat Shank":
            if {rightClickDamage.%victim%} is true:
                remove strength from victim
                apply potion of strength 2 to the victim for 3 seconds
                send "&7&otook damage from right click" to victim    #debug code               
                #spawn lightning bolt at victim #debug code
                delete {rightClickDamage.%victim%}