How to write a script that puts people name who touch the explosion in the table

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)

Did you mean by if humanoid has died? or the humanoid has 0 Health?

Note that if upart.Parent.Humanoid.Died checks the RBXScriptSignal not if humanoid has died


if upart.Parent.Name ~= player and upart.Parent.Humanoid.Health <= 0 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

The previous version of this post is connecting it into Humanoid.Died

explosion.Hit:Connect(function(part)
local hitPlayers = {}

if part.Parent:FindFirstChildOfClass("Humanoid") and part.Parent.Name ~= "NOOB" then

if table.find(hitPlayers,part.Parent.Name) == nil then
table.insert(hitPlayers,part.Parent.Name)

if #hitPlayers == 2 then
print("d-d-d-d-d-d-d-d-double kill!!")
end

end

end

end)

try this

i know I’m spoonfeeding but who doesn’t love to save some time…