I'm trying to my a move where the player throws an object and explodes. That explosion then damages everyone within the area of that area by 10. Though now it only damages one player that touches it. Any help would be appreciated. Thank you!
Boom.Touched:Connect(function(hit2)
local touching = Boom:GetTouchingParts()
for i,v in pairs(touching) do
if not ten2 then return end
ten2 = false
local humanoids = {}
if v.Parent:FindFirstChild("Humanoid") then
table.insert(humanoids, #touching + 1,v.Parent:FindFirstChild("Humanoid"))
for i,v in pairs(humanoids) do
print(v)
v:TakeDamage(10)
table.remove(humanoids, #humanoids)
end
wait()
ten2 = true
end
end
end)
Regards, Bl_ueHistory
