Issue with tables and loops

Why does this not work?

	for i = 1,100 do
		print(_G.players_not_in_safe_zone[i])
	end

Expected output:

nil (100x)

What the output is:

Workspace.GOODEVER.LocalScript:18: attempt to index nil with number 

The reason I need this is because I have a array that is a list of players and it can vary from 0 players to 100 players, the way you get in this array is you enter a zone in the game (Also it needs to constantly check the array to accurately edit attributes of those players), I tried sharing data between scripts through attributes and other ways before this and I’m kinda stuck at this, any help would be appreciated

Does _G.players_not_in_safe_zone exist? Also, why are you using _G?

This doesn’t work because _G.players_not_in_safe_zone doesn’t exist
because it doesn’t exist, it’s nil
and you can’t index nil in any way, here it says your trying to index nil (_G.players_not_in_safe_zone) using a number (i)
also, _G isn’t shared across client and server, they each have their own version of _G (each client has their own _G). So if your setting it on the server then reading it on the client that won’t work.