How do you read a scoreboard?

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

Status
Not open for further replies.

Great_Guy96

New Member
Mar 13, 2019
7
4
3
23
Hello! I have a question:
How do I get a score of a player?
I want to make something that looks like this:

Code:
loop all players:
          set {_maxhp} to %player%'s score of objective maxhealth

I have looked at both docs and forums
 
  • Like
Reactions: jonathanfi
Use
code_language.skript:
set {_maxph} to player's score...
If you use% player% 's without the "quotes" you will get an error.

"%player%'s score of objective maxhealth" And I think that is not an existing effect.
[doublepost=1552635771,1552631895][/doublepost]
code_language.skript:
set {_maxph} to loop-player's ...
you used a loop and you put "player". I think it would fail to reload the skript.
 
Use
code_language.skript:
set {_maxph} to player's score...
If you use% player% 's without the "quotes" you will get an error.

"%player%'s score of objective maxhealth" And I think that is not an existing effect.
[doublepost=1552635771,1552631895][/doublepost]
code_language.skript:
set {_maxph} to loop-player's ...
you used a loop and you put "player". I think it would fail to reload the skript.
I know it is not an existing effect, I am wondering what could work that would do an effect like that!
 
  • Like
Reactions: jonathanfi
Status
Not open for further replies.