Pretty simple.. I have this for do in pairs loop:
1 | for i,v in pairs (_G.PlayerTable) do |
2 | if v ~ = nil then |
3 | print (v) -- checking |
4 | _G.PlayerTable [ v ] :LoadCharacter() -- I want to respawn all the players in the table here, I didn't know what to do so i put that lol its wrong |
5 | break |
6 | end |
7 | end |
I'm trying to reference all the players inside of my table, but I don't know how.
Can somebody show me what i'm doing wrong?
1 | for i,v in pairs (_G.PlayerTable) do |
2 | if v ~ = nil then |
3 | print (_G.PlayerTable [ i ] ) |
4 | game:GetService( "Players" ):WaitForChild(_G.PlayerTable [ i ] ):LoadCharacter() |
5 | end |
6 | end |