Hello devs!,
im having a problem with region3 i want to detect if a part is inside the region and i wrote this simple function for it.
function isInsideRegion(part, region)
return workspace:FindPartsInRegion3WithWhiteList(region, {part})
end
my script uses a grid of 8 when placing normal models and a grid of 4 when placing walls.
until yesterday all was fine. i didnt change anything and now all of a sudden the region3 doesnt detect walls anymore.
(antiRotationPrimaryPart = a clone of the primarypart thats not anymated to make sure the lookvector isnt effected by the parts x,z rotations)
this is the grid for the walls
local vector = Vector3.new(math.floor(x / grid) * grid, (math.floor(y / gridY) * gridY) + defaultRaise, math.floor(z / grid) * grid)
local lookvector = antiRotationPrimaryPart.CFrame.lookVector * grid/2
mouseLocation = (CFrame.new(vector) - (lookvector)) * CFrame.Angles(0, math.rad(rotation), 0)
this is the grid for all other models
mouseLocation = CFrame.new(math.floor(x / grid) * grid, (math.floor(y / gridY) * gridY) + defaultRaise, math.floor(z / grid) * grid) * CFrame.Angles(0, math.rad(rotation), 0)
can somebody tell me what could be the problem?
its kinda a big deal players cant place walls anymore now 