local tabla = {}
game.Players.PlayerAdded:Connect(function(plr)
plr:LoadCharacter()
plr.CharacterAdded:Connect(function(megustalapj)
table.insert(tabla,plr.Name)
for i,obtenerjugador in pairs(tabla) do
if obtenerjugador == plr.Name then
print(tabla)
wait(3)
local char = plr.Character
char.Humanoid.Died:Connect(function(died)
table.remove(tabla,plr.Name)
wait(2)
print(tabla.."tabla eliminada")
end)
end
end
end)
end)
I want the player to remain on a table when he is alive but when he dies I take him out of the table and so on, please help me and if you don’t know, just give your opinion, it doesn’t matter if you think your opinion is stupid
local tabla = {}
game.Players.PlayerAdded:Connect(function(plr)
plr:LoadCharacter()
plr.CharacterAdded:Connect(function(megustalapj)
table.insert(tabla,plr.Name)
for i,obtenerjugador in pairs(tabla) do
if obtenerjugador == plr.Name then
print(tabla)
wait(3)
local char = plr.Character
char.Humanoid.Died:Connect(function(died)
table.remove(tabla,table.find(plr.Name))
wait(2)
print(tabla.."tabla eliminada")
end)
end
end
end)
end)
Hey, really, your answer was very useful, but I need another favor, how would I know if the player’s name is in a table? Please, if you want, give me several options that you know of, please, I beg you. I need your help.