Region3 Whitelist Issues

I have no idea why this code errors, but the error is Unable to cast value to Objects. Here’s the code:

local RegionPart = SallowEnd
local MinSize = RegionPart.Position - (RegionPart.Size * 0.5)
local MaxSize = RegionPart.Position + (RegionPart.Size * 0.5)
local EntireRegion = Region3.new(MinSize, MaxSize)
local Region = workspace:FindPartsInRegion3WithWhiteList(EntireRegion, workspace.MapItself, 99999)

When writing code, consider using documentation to confirm you’re using it properly. The second parameter you’re using should be wrapped in { } because it’s supposed to be a table/array.

1 Like