Thank you! I asked because I am making a cube-activated-button-to-open-door thing and this really helps me, because if I use Touched and TouchEnded, the events will fire multiple times.
But how about if I move with CFrame the Player’s character outside the zone?
For cuboids this is fine, however without performing additional checks this won’t account for other geometries such as Spheres, Cylinders, etc and those from MeshParts and UnionParts.
As you mentioned as well, that only accounts for a singular point, whereas ZonePlus by default provides whole-body checking. It’s also important to note that player region checks are typically not performed on the zones, they’re instead performed on the characters who then determine the zones they are within.
How are you applying this other character model? With HumanoidDescriptions? Setting the player.characters parent? Can you provide more reproduction steps.
A youtuber found the same bug and it takes him multiple times to get the part to work. And I am using zone+ module.
for (const [i, v] of pairs(Rewards.GetChildren())) {
const Trigger = v.FindFirstChild("Trigger") as BasePart;
const zone = new Zone(Trigger);
zone.setAccuracy("Precise");
if (Trigger) {
zone.localPlayerEntered.Connect(() => {
Touched(v.Name);
});
} else {
warn(`"Need a Trigger Part for ${v.Name}`);
}
}
local touchingZonesArray, touchingPartsDictionary = ZoneController.getTouchingZones(player)
for part, zone in pairs(touchingPartsDictionary) do
print(("%s is touching part '%s' from zone '%s'"):format(player.Name, part.Name, zone.zoneId))
end
(make sure to be using the latest model)
v2 also enables you to construct zones with a singular BasePart, so you could alternatively do this and listen for the entered and exited events for each individual part instead.
Hey! ZonePlus Is A W E S O M E, but! I found a problem, whenever some seat or vehicle seat enters the zone, their CanTouch property Is set to false and because of that, you can’t sit there. It happens when the script inside of the zone has partEntered event. Shown in the video below