Right now, for my admin script, I know how to get the people who are nil, but how do I kick then since this won't work?
local S = game.NetworkServer
for _,v in pairs(S:GetChildren()) do
local A = v:GetPlayer()
if game.Players:findFirstChild(A.Name) then
print(A.Name.." is here.")
else
print(A.Name.." is nil!")
v:Destroy()
end
end

1 comment
How about trying game.Players.PlayerRemoving:connect(function(plr) plr:Kick() end) I've seen it presented in a admin script, and I would think it would work as the PlayerRemoving event is fired as the player leaves the server, the client then becomes disconnected.