Hitboxes being very wierd

You can write your topic however you want, but you need to answer these questions:
So i am working on a jojo game (yes another one out of the thousands) and i have most things working fine except for the barrage.

The first time a dummy/character touches the hitbox it works fine, but after that it keeps damaging that specific dummy instead of whats inside the hitbox

i have tried using region3 and magnitude but none of them worked

function GetCharactersInRegion(part)
	local region = Region3.new(part.Position-(part.Size/2),part.Position+(part.Size/2))
	local partsInRegion = workspace:FindPartsInRegion3(region,nil,math.huge)
	local Characters = {}
	for _,Part in pairs(partsInRegion) do
		local Character = Part:FindFirstAncestorOfClass("Model")
		
		if Character then
			if Character:FindFirstChild("Humanoid") then
				table.insert(Characters,Character)
			end
		end
	end
	return Characters
end

coroutine.resume(coroutine.create(function()
			while wait() do
				if IsBarrage == true then
					if BarrageSound.TimePosition >= 2.48 then
						BarrageSound.TimePosition = 0.24
					end
					
					for i,v in pairs(GetCharactersInRegion(HitBox)) do
						if v ~= Character then
							coroutine.resume(coroutine.create(function()
								if not ArmCloneDb then
									ArmCloneDb = true
									BarrageHit(v.HumanoidRootPart,player)
									wait(0.1)
									ArmCloneDb = false
								end
							end))
						end
					end
				end
			end
		end))
2 Likes

Maybe it’s not clearing the characters table?

i tried inserting a table.clear but that didnt work either

Yeah, off hand I can’t quite say yet as I’m too dumb, but it looks like a issue with tables not clearing correctly, so its hurting the dummy that was previously set.