FindPartsInRegion3 not returning anything when it should

I need to find any parts within 15 parts of the player. For this example I will be trying to color the parts red if they are within 15 studs

:FindPartsInRegion3 isn’t returning anything.

Below is the code I’m using.

local r, range = 15

local part = Instance.new("Part")
part.Anchored = true
part.Size = Vector3.new(r, r, r)
part.Parent = game.workspace
part.CanCollide = false
part.Transparency = 0.3
part.CFrame = plr.Character.PrimaryPart.CFrame
while wait() do
    part.CFrame = plr.Character.PrimaryPart.CFrame
    local region = Region3.new(part.Position + Vector3.new(r/2,r/2,r/2), part.Position - Vector3.new(r/2,r/2,r/2))
    local parts = workspace:FindPartsInRegion3(region, part, math.huge)
    print(table.concat(parts, ",")) --this is returning nothing
    for _, brick in pairs(parts) do
        brick.BrickColor = BrickColor.new("Really red") --this will color the bricks red
    end
end

I don’t know, maybe the variable at the top. local r, range = 15

You only put one value instead of two?

Region3.new ( Vector3 min, Vector3 max )

So instead, you should do

local region = Region3.new(part.Position - Vector3.new(r/2,r/2,r/2), part.Position + Vector3.new(r/2,r/2,r/2))