Solved Damage Skript

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

Vini

Member
Apr 8, 2023
35
2
8
25
I'm having an issue where I have a variable which is set by using the lore of the sword (example Strength 1 sets the damage to 1) and if I set the damage with that variable it deals no damage, but when I send the variable to the player it returns the number on the lore

code_language.skript:
command /sword <number>:
    permission: op
    trigger:
        if player's tool is any sword:
            set lore of player's tool to "&7&7Strength &a%arg-1%"

on damage:
    if attacker is a player:
        if attacker's tool is any sword:
            set {_split::*} to uncoloured line 1 of attacker's tool's lore split at " "
            set damage to {_split::2}
            send {_split::2} to attacker
Can someone please help?