Hello, I have a system that is supposed to prevent players from spawning multiple ships. A chunk of the code is pasted below. I have two parts, a min part and a max part. The position of the min part is (127, -11.75, 68) and the position of the max part is (-2, 79, 364.75). Whenever I print the amount of parts in the region, it outputs as 0 parts. How would I fix this?
local Obstruction = false
-- do region 3 checker here
local Obstruction = false
local ObstructionRegion = Region3.new(location.ZoneMin.Position,location.ZoneMax.Position)
local CheckForObstructions = workspace:FindPartsInRegion3WithIgnoreList(ObstructionRegion, location:GetChildren())
print("Number of parts", #CheckForObstructions) -- outputs as 'Number of parts 0'
for i,object in pairs(CheckForObstructions) do
if object.Parent:FindFirstChild("SpawnPart") or object.Name == "PrimaryPartPlacement" then
Obstruction = true
break
end
end
In advance, thanks.

1 comment
location is a folder where the min/max parts are located