Solved How do I check the online players forever

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

KoffeKiten

Member
Mar 8, 2020
2
0
1
33
so i cant update the online players on my scoreboard heres my script:

on join:
scoreboard(player)

loop all players in world "world":
function scoreboard(P: player):
set title of {_P}'s scoreboard to "&E&LDuckAura"
set line 3 of {_P}'s scoreboard to "&eRank: &a"
set line 2 of {_P}'s scoreboard to "&ePlayers Online:&a %size of all players%"

[doublepost=1617810665,1617810591][/doublepost]it says solved when its not
 
so tell me why are you trying to create a new loop every time someone new joins thats extra lag that keeps on looping even when they all leave and the only way to stop is turning off the server.
Code:
on join:
  while player is online:
    set title of player's scoreboard to "&aExample title"
    set line 2 of player's scoreboard to "&eETC"
    wait 1 tick
[doublepost=1617818820,1617818757][/doublepost]This might be laggy because of the delay but just change it into 5 or 10 to make the server less laggy
 
Status
Not open for further replies.