So I'm trying to make it so that my script adds players into a table, right. Now, every time a player dies, I want to remove it from that table. Now whenever I do this, it doesnt work.
for i,v in pairs(Player) do
enabled = false
v.Character.Humanoid.Changed:connect(function()
if v.Character.Humanoid.Health == 0 and enabled == false then
enabled = true
print(v.Name.." has been killed.")
table.remove(Player, v) -- Says number expected, got object can u help with that
print(#Player)
if #Player == 1 or #Player == 0 then
Game_In_Progress = false
print("Game Has Ended")
end
end
end)
end

2 comments
How is Player defined? Can you elaborate more on how it doesn't work? Are there any errors present that we should know about? Any other information that would help us recreate this issue?
Sorry, I rambled on there, I didn't notice the comment on line 7 before posting. Still, how is Player defined?