Solved Damage

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

Remo

Member
Mar 20, 2024
44
3
8
hello, im trying to make a skript so players can only damage other players if the item is supposed for combat, and for other items it will deal only 0.5 hearts to the victim. My problem is that its doesnt make the attacker really hit the victim, the console just take victim's health and it doesnt work with my Combat log because theres no player that hit the victim but console did. Also it doesnt do any knockback. heres my code
Code:
on damage:
    if attacker is player:
        if lore of attacker's held item is not "&8Combat":
            damage victim by 0.5 hearts
            cancel the event
 
already fixed it
Code:
on damage:
    attacker is player
    if lore of attacker's held item is not "&8Combat":
        set the damage to 0.5