How can I transfer the value of a specific scoreboard of a specific player to a variable? I want to use it in my script. Example: when the script gets triggered, for example through a click with an item in the hand, the scoreboard value of the clicking player gets transfered to the variable, so I can use it later in the script to give the player exactly that amount of diamonds.
#Making a scoreboard value a js variable
18 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
can't you just track that value with persistant data using only kubejs and not a scoreboard?
Some things are just verry handy with scoreboard like entity kills, wich I want to use. Also the sidebar display and the fact that you can put the values into tellraw are things I want to use.
you can also track it on both, so once for kubejs for kubejs use and once with a scoreboard for display use
Just wanted to know if there is an easy way to do it
so you track with persistant data and each time it changes you do something like /scoreboard players set <player name> <name> <score>
I don't think so
I wouldn't know how to track it with persistant data...
though you can wait and see if other people know
Will do
like this <player>.persistentData.entities_killed += 1
and there's an entity death event
Ah ok
i mean this guy did this #1129981022554050630 message
[Quote ➤](#1129981022554050630 message) changed nbt tag filter to scoreboard tags filter