#what does the circled bit do?

18 messages · Page 1 of 1 (latest)

maiden compass
tardy bone
#

wdym

#

players is an table that haves all the player with a numeric index

#

like

#

[1] = Player1;
[2] = Player2;

#

and you're doing for i = 1 (starting for index 1), #players (the length of the table), and that just is checking if the character is nil

#

and getChildren is bad written, is GetChildren

wet ferry
#

true

tardy bone
#

and the service "Players" has :GetPlayers

wet ferry
#

even truer

polar imp
#

I would suggest doing a foreach loop here tho

#

For _, plr in players do ... end

static owl
# maiden compass

game.players:getchildren/getplayers returns an array of children or in this case just players

#

and u can use indexs in tables to get the key in that spot

#

for example

#
local array = {"a","b"}
print(array[1]) --prints a
#

so players[i] would be one of the players