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

How to gather all the values of every player and put them into a table?

Asked by
Galicate 106
6 years ago

Im making a fps game where when you join a game, it will detect the Level of every player, and if the other players average levels are lower or higher than a specific number, then it will send you into a different server better suited for your level. So how do I gather all the values of player levels?(the levels are number values inside the game.Players.LocalPlayer)

0
Do you mean the values are in the leaderstats? Meltdown81 309 — 6y
0
Kinda yea, but its not called leaderstats. Its the same thing more or less. Galicate 106 — 6y

1 answer

Log in to vote
1
Answered by
Fifkee 2017 Community Moderator Moderation Voter
6 years ago
Edited 6 years ago

Go over the player's levels using some form of loop (pairs, ipairs, while, repeat) and then apply the server changing system from there.

0
pairs and ipairs isnt a form of loop, its an iterator function used in the for loop. RubenKan 3615 — 6y
Ad

Answer this question