To implement double kills with bombs, I’m making a script that puts the names of the players in the table when two people touch the explosions at the same time. But this script only detects one person. A script that detects the number of players in range is also good. Please help me!
explosion.Hit:Connect(function(upart)
if upart.Parent:FindFirstChildOfClass('Humanoid') then
upart.Parent.Humanoid:TakeDamage(100)
local character = upart.Parent
local plr = game.Players:GetPlayerFromCharacter(character)
if upart.Parent.Humanoid.Died and upart.Parent.Name ~= player then
if upart.Parent.Name ~= "NOOB" then
for _, c in ipairs(temo) do
if c ~= upart.Parent.Name then
table.insert(temo, upart.Parent.Name)
end
end
print(temo)
if #temo == 2 then
print('double kill')
end
end
end
end
end)