1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you read a scoreboard?

Discussion in 'Skript' started by Great_Guy96, Mar 13, 2019.

  1. G

    Great_Guy96 Member

    Joined:
    Mar 13, 2019
    Messages:
    2
    Likes Received:
    0
    Hello! I have a question:
    How do I get a score of a player?
    I want to make something that looks like this:

    Code (Text):
    1. loop all players:
    2.           set {_maxhp} to %player%'s score of objective maxhealth
    I have looked at both docs and forums
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    135
    Likes Received:
    6
    Use
    Code (Skript):
    1.  
    2. set {_maxph} to player's score...
    3.  
    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.
    --- Double Post Merged, Mar 15, 2019, Original Post Date: Mar 15, 2019 ---
    Code (Skript):
    1.  
    2. set {_maxph} to loop-player's ...
    3.  
    you used a loop and you put "player". I think it would fail to reload the skript.
     
  3. G

    Great_Guy96 Member

    Joined:
    Mar 13, 2019
    Messages:
    2
    Likes Received:
    0
    I know it is not an existing effect, I am wondering what could work that would do an effect like that!
     
Loading...