How to rotate region3

I’m using region3 for a hitbox, but it doesn’t rotate to the direction that my character is facing

heres my script:

local Vector = player.Character.HumanoidRootPart.CFrame * CFrame.new(-0.5, 0, -3.25).p
local region = Region3.new(Vector - Vector3.new(2, 3, 2), Vector + Vector3.new(3.5, 5, 3.5))
local detect = workspace:FindPartsInRegion3(region, nil, 20)
	
	
local visualizePart = Instance.new("Part", workspace)
visualizePart.Anchored = true
visualizePart.Size = region.Size
visualizePart.CFrame = region.CFrame
visualizePart.Transparency = 0.5
visualizePart.CanCollide = false
game.Debris:AddItem(visualizePart, 2)

Is there any way to rotate the region3 area? Changing the Vector to a CFrame instead of a position just gives me an error

1 Like

No.

Region3 is a data type that describes a volume in 3D space similar to an axis-aligned rectangular prism.”
- Region3 | Documentation - Roblox Creator Hub

But check out RotatedRegion3 by EgoMoose

1 Like