Hello everyone! I need to make a custom system which determines if two parts are colliding they can be rotated in any way ( ! ). I tried doing it, but to no avail. Though, I managed to write a function that finds out if a vector3 position is inside a Part, except the part is separated into cframe and size.

```
local function IsPointInOrientedBox(point, cf, size)
local vecOffset = cf:PointToObjectSpace(point)
local vecX = vecOffset.X
local vecY = vecOffset.Y
local vecZ = vecOffset.Z
local halfX = size.X/2
local halfY = size.Y/2
local halfZ = size.Z/2
local inX = (vecX >= -halfX and 1 or 0) + (vecX <= halfX and 1 or 0)
local inY = (vecY >= -halfY and 1 or 0) + (vecY <= halfY and 1 or 0)
local inZ = (vecZ >= -halfZ and 1 or 0) + (vecZ <= halfZ and 1 or 0)
local collSum = inX + inY + inZ
return collSum == 6 and true or false
end
```

Could any of you help me write a function just like the one above, except for cframe and size instead of just a point? Any help is appreciated, thanks in advance!