Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to check if the player is trying to place a model to another?

So i have this drag system, it clones model to mouse position and can be place anywhere in the map around 50 meter from player. But my problem is the models can be place to one another they are like can collide even tho the model itself is not.. so how do i check if the player is trying to place the model to another ? Not asking for code, but explaination would be helpful

1 answer

This really only requires API knowledge. When the player tries to place their model, create a Region3 using the parameters from :GetExtentsSize. Then you can use :FindPartsInRegion3 to see if the model contains anything you do not want it to.

1 comment

0

Should i use mouse.hit.p or mouse.target for this ":FindPartsInRegion3(Region,nil,math.huge))"

This discussion is preserved as it was. New answers, comments, and votes are closed.