So Im using ZonePlus, and am wondering if its possible to get a specific part within a zone that I am touching (my player) - Look at the picture I drew for a better understanding.
Bro as much as I appreciate your response, I am trying to figure out how to get a specific zone part from within a Zone created of mutliple parts. to see which one you touched - not trying to get the whole zone.
Ohh, I get it now. In that case you may want to use an individual zone for each part (on top of a generalized one for multiple parts, for whatever purpose you have it).
If you want a more optimized (yet more inconvenient) approach, you can always try modifying the module to account for this behavior.
Actually, I’ll try that. I’ll edit this message if I do it.
kinda happy cause its the first time ive successfully edited a module but meh
I think that instead of explaining you what to change, I’ll just give you the modified module and some sample code. It should work as zone:getPlayer(player_name: string) and it should return the Part from zone where player is in.
Although, do seriously note that the changes are not optimized. The module originally iterates through all players with great optimization to check for their respective zones, but now for every iteration it checks whether or not its checking over the specifically given player (string), using the function or not. It also adds even more checks to ensure it returns the part and not cause errors.
well done, I salute you. Will surely be useful for others and hope Zoneplus makes an update to allow the playerentered function to have a second parameter that lets users know what parts the user is touching within that zone. Thank you.