After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local part = script.Parent
local WrkSPace = game.Workspace
local event = part.Parent.Event
local function humchek(parts)
local humanoids = {}
for _, v in pairs(parts) do
if v.Parent and v.Parent:FindFirstChild("Humanoid") then
local hum = v.Parent:FindFirstChild("Humanoid")
return(hum)
end
end
end
event.Event:Connect(function()
hums = {}
local parts = WrkSPace:GetPartsInPart(part)
local hum = humchek(parts)
if hum then
table.insert(hums, hum)
end
for _, v in pairs(hums) do
if v:IsA("Humanoid") then
v:TakeDamage(10)
end
end
table.clear(hums)
end)
When i try to make table based stuff it counts same hum mny times, when i try to use loop throu it dont works script above is single hit hitbox i have no idea how to make it work for many hits