local function hitPlayer(pos, size, dmg, userName)
local pos1 = pos - (size / 2)
local pos2 = pos + (size / 2)
local region = Region3.new(pos1, pos2)
local parts = game.Workspace:FindPartsInRegion3(region)
for i, v in pairs(parts) do
if v.Name == "HumanoidRootPart" and v.Parent.Name ~= userName and v.Parent:FindFirstChild("Humanoid") then
v.Parent.Humanoid:TakeDamage(dmg)
end
end
end
for some reason not all dummies in the region3 are taking damage, and the ones that do take damage are always the same ones
local hitCoroutine = coroutine.create(function() wait() hitPlayer(hb.Position, hb.Size, 50, plr.Name) end)
coroutine.resume(hitCoroutine)
this is how i fire it