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:
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()
I need to get the model not the part.
You can try :FindFirstAncestorWhichIsA(“Model”)
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
Thanks, It started to work now
If you don’t want duplicates of multiple parts pointing to a single model you should create a sanity check with a table
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.