New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why is it printing; 'Not in region', even though it's in the region?

Asked by 8 days ago

I tested Region3, since i have not tested Region3 in a long time.

It keeps on printing 'not in region', even though im in the region?

local RegionPart = game.Workspace.RegionPart
local Region = Region3.new(RegionPart.Position - (RegionPart.Size / 2), RegionPart.Position + (RegionPart.Size / 2))

PartsToIgnore = game.Workspace.Market:GetDescendants()

while wait(.5) do
    for _, part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region, PartsToIgnore)) do
        if part.Parent:FindFirstChild('Humanoid') then

            print('A humanoid was spotted in the region')
        else
            print("Not currently any players")
        end
        end
    end
0
From what i could see, the RegionPart it self might be inside the region. Try adding the RegionPart to the ignore list. XviperIink 314 — 8d
0
It's still not working, it's flickering between the prints :/ maxpax2009 311 — 8d
0
Trying printing the part before the if statement and see what it triggering it.  It also could be your map touching it too. XviperIink 314 — 8d
0
There's a limit of 20 instances found for the FindPartsInRegion3WithIgnoreList unless you override the last parameter, can you check if there's not too many parts in your region. If so then you have to invert your logic so only HumanoidRootParts are in a whitelist. FloweryMonkeyboy5 984 — 8d
0
Ahh flowery it right, might be because of the limit, change it to something huge like 10000.. Haven't touched region3 in a while lol... XviperIink 314 — 8d

Answer this question