function waitforwin()
local juggy = game.Players:WaitForChild(workspace.Survivors.Juggernaut.Value)
local juggychar = juggy.Character
local plrs = game.Players:GetPlayers()
local players = {}
table.insert(players, plrs.Name)
for i,v in pairs (players) do
if v == juggy.Name then
table.remove(players, i)
end
end
juggychar.Humanoid.Died():connect(function()
print ("players win")
end)
for i, player in pairs (plrs) do
local chars = player.Character
chars.Humanoid.Died():connect(function()
for i,v in pairs (players) do
if v == plrs.Name then
table.remove(players, i)
for i, numofplayers in pairs (players) do
if i > 1 then
print (juggy.." won")
end
end
end
end
end)
end
end
It was calling Died() a userdata value and printed an error then i removed () from Died() and it didnt say that the player died.. this is confusing me...

1 comment
basically trying to make a juggernaut minigame