Thanks for helping if you're reading this! The problem is that the for loop isn't working when I reference the players and it keeps returning this error in the studio.
12:57:36.608 - ServerScriptService.Script:28: attempt to index field 'Character' (a nil value)
Do any of you know what's wrong with this for loop? Or am I calling the player incorrectly?
while true do
wait(1/30)
local Players = game.Players:GetPlayers()
for i=1, #Players do
wait(10)
if Players.Character:WaitForChild("Humanoid") then
Players.Character.Humanoid.Died:Connect(function()
print (Players.." has died!")
end)
end
end
end
