Scoreboard Toggle Issue (SkBee)

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

NotNinjaTalon

Member
Mar 2, 2020
12
1
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:
function Scoreboard(player: player):
 set title of {_player}'s scoreboard to "      &7»&r &a&lSk&2&lFarming &7«      "
 set line 5 of {_player}'s scoreboard to "&5&l"# in sidebar of {_player} to 5
 set line 4 of {_player}'s scoreboard to "&3» &7&lNAME &a%{_player}%"# in sidebar of {_player} to 4
 set line 3 of {_player}'s scoreboard to "&3» &7&lONLINE &c%{online_players}%"# in sidebar of {_player} to 3
 set line 2 of {_player}'s scoreboard to "&5&l"# in sidebar of {_player} to 2
 set line 1 of {_player}'s scoreboard to "&b&l"# in sidebar of {_player} to 1
 
command /toggle [<text>]:
    trigger:
        if {show_info::%player%} is not set:
            set {show_info::%player%} to true
            toggle player's scoreboard to on
            send "&7Enabled your scoreboard." to player
        else:
            delete {show_info::%player%}
            toggle player's scoreboard to off
            send "&7Disabled your scoreboard." to player

on join:
 clear player's scoreboard
 while player is online:
  Scoreboard(player)
  wait 10 ticks
 
When you join, remove it, then wait a few seconds and it appears, see if it works
 
Status
Not open for further replies.