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!


    You can always check out 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.

Sidebar will not show up.

Discussion in 'Skript' started by BaddCamden, Dec 2, 2019.

Thread Status:
Not open for further replies.
  1. BaddCamden

    BaddCamden Active Member

    Nov 18, 2019
    Likes Received:
    I was trying to make a sidebar for a minigame that would display the players and time to wait, but while fixing something, the sidebar will no longer show up. Also, if there is any way to update the player count, that would be divine.

    on load:
    clear {zombiesurvival.players::*}
    clear {zombiesurvival.numplayers}
    loop all players:
    wipe loop-player's sidebar
    set {zombiesurvival.timetillstart} to 120

    function ClearVariable():
    clear {zombiesurvival.players::*}
    clear {zombiesurvival.numplayers}
    clear {zombiesurvival.teleportplayersloop}
    set {zombiesurvival.timetillstart} to 120

    every second:
    clear {zombiesurvival.players::*}
    clear {zombiesurvival.numplayers}
    loop all players in world "ZombieSurvival":
    add loop-player to {zombiesurvival.players::*}
    set {zombiesurvival.numplayers} to size of {zombiesurvival.players::*}
    set {_zombiesurvival.loopplayer} to loop-player
    set name of sidebar of {_zombiesurvival.loopplayer} to " &bZombie Survival "
    set score "&aPlayers: &d%{zombiesurvival.numplayers}%/6" in sidebar of {_zombiesurvival.loopplayer} to 2
    if {zombiesurvival.numplayers} is less than 2:
    set id based score "&1Waiting for more players..." in sidebar of {_zombiesurvival.loopplayer} to 1 with id "idB"
    remove score with id "idA"
    if {zombiesurvival.numplayers} is greater than 1:
    remove score with id "idA"
    remove score with id "idB"
    set id based score "&1%{zombiesurvival.timetillstart}% seconds to wait for more players." in sidebar of {_zombiesurvival.loopplayer} to 1 with id "idA"
    if {zombiesurvival.timetillstart} is greater than 0:
    set {zombiesurvival.timetillstart} to {zombiesurvival.timetillstart} - 1
    if {zombiesurvival.timetillstart} is less than 1:
    teleport loop-player to location at 181, 4, -133 in world "ZombieSurvivalA"
    set {zombiesurvival.teleportplayersloop} to {zombiesurvival.teleportplayersloop} + 1
    if {zombiesurvival.teleportplayersloop} is equal to {zombiesurvival.numplayers}:
    wait 1 second
    if loop-player isn't in world "ZombieSurvival":
    wipe loop-player's sidebar

    on player world change:
    if world is "ZombieSurvival":
    if {_zombiesurvival.numplayers} is greater than 6:
    execute player command "/mvtp %player% lobbyworld"

    Skript, skquery, skvault, skrayfall
Thread Status:
Not open for further replies.