I have a script that adds to the table, but what I'm trying to do is that every 10 seconds, it will print out the contents.
local deadPlayers = {}
game:GetService('Players').PlayerAdded:connect(function(player) --To add the information
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
table.insert(deadPlayers, player.Name)
print(player.Name)
end)
end)
end)
while wait(10) do
print(#deadPlayers:GetFullName()) --Extracted from http://wiki.roblox.com/index.php?title=Table#Reading_from_and_writing_to_arrays
end
But I don't know how to fix it.
My error
21:04:48.821 - ServerScriptService.Script:12: attempt to call method 'GetFullName' (a nil value)
21:04:48.823 - Stack Begin
21:04:48.825 - Script 'ServerScriptService.Script', Line 12
21:04:48.827 - Stack End

1 comment
Sorry for the rushed post.