Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Do I Constantly Update Players?

Asked by 6 years ago

I want to be able to Constantly update a table of players. Though the script will not be ran at the start of the Game. So how do I get all players in the game, while updating it when players leave and join?

0
Where is your attempt? I'll happily help you. But I need to see the attempt. User#19524 175 — 6y
0
Its not a major issue, just wanted to notify you about it. User#21908 42 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

At the time of creating the table loop through game:GetService("Players"):GetPlayers() and add each players name or whatever to the table or make the table = game:GetService("Players"):GetPlayers() at first. Then create a PlayerAdded event listener and every time someone joins add them to the table and then when someone leaves remove them from that same table. Hope this helps and have a great day scripting!

0
Because you did not post or apparently attempt a script I will only give you some tips. I will not write any script for you. User#21908 42 — 6y
0
My bad I am new to scripting helpers but I now know. ForKaznia 6 — 6y
1
I say that was a better attempt on the answer than the question. seith14 206 — 6y
0
^ LMAO User#19524 175 — 6y
Ad

Answer this question