I'm trying to make a big blast that my user can create. This blast is supposed to damage everything it touches, but it only damages one player/NPC. I know this is because of how I have the debounce set up, but how would I do it differently to work as an AoE move?
Script:
-- Damage
for i,v in pairs(game.Workspace:GetChildren()) do
if v == t1 or v == t2 or v == t3 or v == t4 or v == t5 or v == t6 then
local db = false
v.Touched:Connect(function(hit)
if not db and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= player.Name then
db = true
tagged(hit,player)
local hum = hit.Parent.Humanoid
hum:TakeDamage((powerLevel.Value*3)+math.random(40,50))
wait(10)
db = false
end
end)
end
end
Any help is appreciated!

3 comments
use explosion and explosion.hit, its the easiest only known way
no
This is a custom-made explosion using mesh parts. I don't think explosion.hit is what I'm looking for.