How to seperate a map into different regions/districts, so I can detect what region of a map a player is in?

I have a map, and I want to separate sections of this map into different “districts”. I tried messing with region3, but you can only have a large cube with region3s and I don’t want to use multiple region3s for one district (districts should have interesting shapes, not just big cubes). I don’t want to use touch detection either since there’s no efficient whitelisting/blacklisting, which makes it very ‘laggy’ for maps with a lot of parts to cycle thru.

In general, I want to make an GUI that shows what district you are in and be able to load in assets in a region depending on if there is a player in said region.

Any efficient way to do this? One way I’m thinking of is to calculate a players district using only the position of their humanoidrootpart, but I’m not sure how.

I don’t know how to script that but you can put up signs saying “welcome to (your town/district name) please drive carefully through our (your town/district you can put any of the 2) I guess that will help you if you need a separate idea just message me through ROBLOX by following me.

Use Zone Plus to detect players with interesting shapes, not just boxes. More here:

1 Like

My strategy for this is defining a region or district by a single part underneath the map and then I perform a whitelisted downcast against these parts to check which area part is hit. If none is hit then I just mark the zone as unknown or out of bounds depending on my game, otherwise the area part that gets hit by the downcast is where the player currently is. I try to make sure the parts are right under the map so that I can keep the ray short and thus inexpensive to cast every frame from Heartbeat.

1 Like