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

Scoreboard Toggle Issue (SkBee)

Discussion in 'Skript' started by NotNinjaTalon, Jul 16, 2020.

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

    NotNinjaTalon Member

    Joined:
    Mar 2, 2020
    Messages:
    12
    Likes Received:
    1
    I am having issues with my /toggle command, the scoreboard functions properly and /toggle switches between them but when a player enables the scoreboard then decides to disconnect & rejoin the scoreboard doesn't display on. I assume I have messed up somewhere within my on join event, if anyone could help out I'd really appreciate it. Thanks!

    Video of the issue:

    Addons installed: SkBee, Skellet, SkQuery, TuSKe, SkRayfall

    Code (Text):
    1. function Scoreboard(player: player):
    2.  set title of {_player}'s scoreboard to "      &7»&r &a&lSk&2&lFarming &7«      "
    3.  set line 5 of {_player}'s scoreboard to "&5&l"# in sidebar of {_player} to 5
    4.  set line 4 of {_player}'s scoreboard to "&3» &7&lNAME &a%{_player}%"# in sidebar of {_player} to 4
    5.  set line 3 of {_player}'s scoreboard to "&3» &7&lONLINE &c%{online_players}%"# in sidebar of {_player} to 3
    6.  set line 2 of {_player}'s scoreboard to "&5&l"# in sidebar of {_player} to 2
    7.  set line 1 of {_player}'s scoreboard to "&b&l"# in sidebar of {_player} to 1
    8.  
    9. command /toggle [<text>]:
    10.     trigger:
    11.         if {show_info::%player%} is not set:
    12.             set {show_info::%player%} to true
    13.             toggle player's scoreboard to on
    14.             send "&7Enabled your scoreboard." to player
    15.         else:
    16.             delete {show_info::%player%}
    17.             toggle player's scoreboard to off
    18.             send "&7Disabled your scoreboard." to player
    19.  
    20. on join:
    21.  clear player's scoreboard
    22.  while player is online:
    23.   Scoreboard(player)
    24.   wait 10 ticks
     
  2. Deku

    Deku Member

    Joined:
    Jul 12, 2020
    Messages:
    36
    Likes Received:
    0
    When you join, remove it, then wait a few seconds and it appears, see if it works
     
  3. NotNinjaTalon

    NotNinjaTalon Member

    Joined:
    Mar 2, 2020
    Messages:
    12
    Likes Received:
    1
    Mind showing me what you mean, I'm a bit lost to be quite honest haha.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...