Region3 not accurate?

I’m using Region3 to deal damage, but some ppl outside the region are getting damaged, and some inside the region aren’t:

https://gyazo.com/976757a0bd1a6a8546bf9b7c01ec40ea

Here’s the script:

local function hitPlayer(pos, size, dmg, userName, knockBack, userLV)
	
	local pos1 = pos - (size / 2)
	local pos2 = pos + (size / 2)
	
	local region = Region3.new(pos1, pos2)
	local parts = game.Workspace:FindPartsInRegion3(region, nil, 1000)
	
	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)
			
			if knockBack == true then
				
				local bv = Instance.new("BodyVelocity", v)
				bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
				bv.Velocity = userLV * 100
				wait(0.1)
				bv:Destroy()
				
			end
			
		end
		
	end
	
end
1 Like

Maybe this could help, I don’t really work with Region3, but I think you might find this helpful:

1 Like

I checked it out and it looks pretty cool, but I was wondering if there was a way to fix my problem and keep using Region3, just so I can finish a task, then I’ll learn Zone+

Because you can’t rotate the Region3. Even though the box says it rotated, it is still in a fixed rotation, it’s position just change.

Could possibly be because standard region3s don’t support rotated hitboxes. Try using a RotatedRegion3 module

wdym rotated? it’s an anchored part, it doesn’t move at all