Solved Scoreboard help

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

DZsquid

New Member
Jul 24, 2017
5
0
0
34
Hello, I’m currently trying to work on a uhc server. I have this scoreboard uskript, that when you kill a player, the counter goes from 0 to 1 and goes up as you get kills. Although when I kill someone, it stays at 0. The code is “add 1 to {kills.%attacker.Game}”. If more detail is needed I’ll give it, I’m trying to learn how to use skript currently so I’m just a little confused. If I just tell it to set to a certain number like “set {kills.%attacker%.Game} to 1” it goes up to 1 after the kill. But stops at 1. If anyone could help, that would be awesome. Thank you. I’m also new to the website so I don’t really know how things work. Ill add the file with the post. Just take note, i did not code this, I found this off of youtube, I might very slight changes, and I just want to get the kills working.
 

Attachments

  • ScoreBoard.sk
    25.8 KB · Views: 178
Last edited:
this is the scoreboard for kill
Code:
set score "%{SB::Color2}%Kills: %{SB::Color3}%%{Kills.%loop-player%.Game}%" in sidebar of loop-player to 3

and change when death to
Code:
on death of player:
    if attacker is a player:
        add 1 to {Kills.%attacker%.Game}

you wrong named the variable
 
Hmmm..I copied and pasted what you said and fixed that kill test command to “add 1 to {Kills.%player%.Game}”. I tried that command because I was alone and the board never went up. Idk if this is because I didn’t actually kill someone or that it’s simply not working.
 
command /killtest:
trigger:
add 1 to {Kills.%player%.Game}

This is supposed to basically add 1 to the scoreboard. I don't get any errors, and i'm also certain I have the right plugins
[doublepost=1576731742,1576698221][/doublepost]Hey, I fixed it myself, I had to set the scoreboard at 0 every time for some reason for it to start working, I made a command which did this, added it into my UHC skript, and now the kills go up when I run the kill test command, I appreciate the help.
 
Status
Not open for further replies.