i'm having a huge headache with this. Its something that usually works without problem but in this case it throws an error. This part of my master script is supposed to check if the object "LoadDone" exists inside each player and if its nil remove them from the table so they don't join the round. I can't publish the whole script as it is 300 lines long and i'm working for someone.
ty=game.Players:GetPlayers()
for x=1,#ty do
found=ty[x]:FindFirstChild("LoadDone")
if not found then
table.remove(ty,x)
end
end
it returns the error
09:06:57.617 - ServerScriptService.MasterScript:27: attempt to index field '?' (a nil value)
09:06:57.618 - Stack Begin
09:06:57.618 - Script 'ServerScriptService.MasterScript', Line 27
09:06:57.619 - Stack End
line 27 translates to line 3
