Region3 Not working

So I got this Region3 Source and it seems to be working up in till it starts checking for parts inside it. It doesn’t error or print anything

   		local Humanoid = game.Players.LocalPlayer.Character.Humanoid
   		local character = player.Character
   		local hmndrootpart = character:FindFirstChild("HumanoidRootPart")
   		
   		-- wait for the player GUI to load
   		player:WaitForChild("PlayerGui")
   		
   		local VS = Instance.new('Folder')
   		VS.Name = "PlayerObjects"
   		VS.Parent = game.Workspace
   		
   		-- define a regional visualization part
   		local regionSize = 10
   		local heightSize = 10
   		local visualizeRegion = Region3.new(Vector3.new(1,1,1), Vector3.new(regionSize,heightSize,regionSize))
   		
   		
   		-- print("VisualizePart Created")
   		local visualizePart = Instance.new("Part", game.Workspace.PlayerObjects)
   		visualizePart.Name = player.Name.."-visualizePart"
   		
   		
   		visualizePart.Anchored = true
   		visualizePart.Size = visualizeRegion.Size
   		visualizePart.CFrame = visualizeRegion.CFrame
   		visualizePart.Color = Color3.new(255,0,0)
   		visualizePart.Transparency = .4
   		visualizePart.CanCollide = false
   		
   		
   		
   		game:GetService("RunService").Heartbeat:connect(function()
   		
   				-- buffer slightly
   				wait()	
   					
   				-- move the part to the players position and adjust it based on the lookvector of the humanoid
   				visualizePart.Position = hmndrootpart.Position	+ hmndrootpart.CFrame.lookVector * (regionSize / 2)
   				
   				local PlayerSearchRegionTest = Region3.new(visualizePart.Position-(visualizePart.Size/2),visualizePart.Position+(visualizePart.Size/2))				
   				local parts = workspace:FindPartsInRegion3WithWhiteList(PlayerSearchRegionTest, {workspace.CurrentCamera}, 1000)
   						 
   					-- loop through the parts array and print the name of each part
   					for partIndex, part in pairs(parts) do 
   					    print("Part")
   		
   					end		
   				
   		end) ```
1 Like

I don’t know if this is related, but your only whitelisting the camera for parts. (unless that is the intended purpose)