Is there a function like GetModelsInBoundingBox()

I am trying to make a placementsystem and I need to get a model by the client structures bounding box.(if It is touching)

Here is the example image:

There’s a function called GetTouchingParts() but this only works for parts that aren’t anchored, maybe you’d want to use :GetPartsInPart()

1 Like

I need to get the model not the part.

You can try :FindFirstAncestorWhichIsA(“Model”)

1 Like

Ok I will try that maybe this will work

I think thats not working we need to try something else

Have you tried it like this

For _,v in ipairs(Object:GetPartsInPart()) do
    local model = v:FindFirstAncestorWhichIsA(“Model”)
end
1 Like

Thanks, It started to work now

1 Like

If you don’t want duplicates of multiple parts pointing to a single model you should create a sanity check with a table

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.