Region3 refuses to work

I’ve been using region3 for quite awhile now. I recently made a hit detection for my powers using region3 and it worked perfectly fine until i used it for this…

The region doesn’t seem to detect anything
image

local Damage = function(HitBox, owner, Damage)
	local Region = Region3.new(HitBox.Position - (HitBox.Size/2), HitBox.Position + (HitBox.Size/2));
	local Parts = workspace:FindPartsInRegion3WithWhiteList(Region, {workspace.Players, workspace.Enemies}, 200);
	
	for i, v in pairs(Parts) do
		print('a')
		if v.Parent:FindFirstChild("Humanoid") then
			local VicHum = v.Parent:FindFirstChild("Humanoid");
			
			if v.Parent.Name ~= owner.Name then
				VicHum:TakeDamage(Damage)
			end
		end
	end
end

function Server_Detect(Player)
	local Character = Player.Character;
	local Root = Character.HumanoidRootPart;
	local ServerPart = Instance.new("Part");
	ServerPart.CanCollide = false;
	ServerPart.Anchored = false
	ServerPart.Size = Vector3.new(14,14,1000)
	ServerPart.Transparency = 0
	ServerPart.Parent = workspace.Debris;
	ServerPart.Massless = true
	local Weld = Instance.new("Weld")
	Weld.Parent = ServerPart;
	Weld.Part0 = ServerPart;
	Weld.Part1 = Root;
	Weld.C0 = CFrame.new(0,0,514)
	game.Debris:AddItem(ServerPart, 3)	
	
	spawn(function()
		repeat
			wait(.1)
			Damage(ServerPart, Player, 3)
		until ServerPart.Parent == nil
	end)
end

How would I fix this?

1 Like

I notice that the intended targeting zone is indicated by the gray block and you are trying to use Region3 over it. It’s not that Region3 isn’t working but rather it can’t be used over rotated areas. You’ll have to use a special handler for this, such as EgoMoose’s Rotated Region 3 Module.

Thanks! Vary much appreciated!