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

Detect whether something has entered a region?

Asked by 5 years ago
Edited 5 years ago

I'm trying to create a script that detects if an object has entered a region. Basically it checks and if something enters an area, it activates something. When it leaves, it activates something else. I've tried scripting it but I cannot get it to work properly. Any ideas?

0
What do you exactly mean by Region? So, does it mean, like for example a folder, and if a part gets added to it then something triggers? Or a specific area(Vector3)? Or a few for example, if anything gets added in a folder called ej8, or a model called 92138kda? Please be a little more specific. Thanks! mudathir2007 157 — 5y
0
Region3 CarlPlandog 20 — 5y
0
As In if something enters a specific area then it triggers something. CarlPlandog 20 — 5y
0
Can you provide more specifics? There are different ways to do this with just bounds checks, or with parts and Touched events. Depending on the size and number of these regions, and how many parts are going in and out, one solution might scale better than another. EmilyBendsSpace 1025 — 5y
0
How fast the object is moving matters too, particularly if the region is small too. If the object is moving fast enough, many frame or Touch event based detection methods will fail to detect it. EmilyBendsSpace 1025 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

I've updated the question/

Ad

Answer this question