Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
npott13 23
7 years ago

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

Log in to vote
0
Answered by
cabbler 1942 Moderation Voter
7 years ago

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.

0
Should i use mouse.hit.p or mouse.target for this ":FindPartsInRegion3(Region,nil,math.huge))" npott13 23 — 7y
Ad

Answer this question