Hi, I'm really new to Skript and I am having some trouble trying to figure out how to assign a numerical scoreboard value to a variable.
Here is my code:
What I am trying to do is when the player right clicks a diamond pickaxe, it will add 1 score to "Goal" for the lore of the item which works fine (and then set that score to the 1st line of a holographic display, but whenever I try to get the current "Goal" score of that team, it won't work. I cannot find any expression that would be able to replace result as that only works for a furnace.
Can anyone help?
Here is my code:
Code:
on rightclick:
if held item is a diamond pickaxe with custom model data 1:
set {Team} to the 1st line of lore of item
execute command "scoreboard players add %{Team}% Goal 1"
execute command "scoreboard players get %{Team}% Goal"
set {TeamScore} to result
execute command "hd setline Score 1 %{TeamScore}&"
What I am trying to do is when the player right clicks a diamond pickaxe, it will add 1 score to "Goal" for the lore of the item which works fine (and then set that score to the 1st line of a holographic display, but whenever I try to get the current "Goal" score of that team, it won't work. I cannot find any expression that would be able to replace result as that only works for a furnace.
Can anyone help?