ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries

I seem to be having an issue with a bulk buy system by putting items on a counter. Everytime a new item is added, the value goes up correctly… But when there’s already more than one item in the region, it goes up x how many items are in the region. Idk if the zone works that way intentionally, but I’m referencing the shop item as the part that JUST entered the region so it shouldn’t be messing up.

I recommend checking out the source code behind the Voting Pads at the Playground:

https://www.roblox.com/games/6166477769/ZonePlus-Playground

Hi, i’ve implemented this into a skateboard script for grinding, and in playtesting ive noticed sometimes it isnt completely accurate when you leave the zone?

You can achieve this by doing:

zone:setAccuracy("Precise")

It’s recommended to only do this on the client though as a check will be performed every frame. More details here:

1 Like

I would set ‘zone’ as local zone = require(game.ReplicatedStorage.Zone) right?

You would call that on a zone object returned from the Zone.new constructor:

local Zone = require(game.ReplicatedStorage.Zone)

local zone = Zone.new(zoneGroup)
zone:setAccuracy("Precise")

More info here:

Thanks I was a bit confused about that.

Ok so i have the zone checking in a localscript like this

rails.localPlayerEntered:Connect(function(player)
	OnRail = true
	FakeRailStart:Play()
	FakeRailLoop:Play()
	Remotes.Sound:FireServer("startrail")
end)
rails.localPlayerExited:Connect(function(player)
	OnRail = false
	FakeRailStart:Stop()
	FakeRailLoop:Stop()
	Remotes.Sound:FireServer("stoprail")
end)

and its working perfectly on the client but sometimes the sounds dont stop on the server? like when a player slightly enters it and leaves like immediately you can still hear the sounds playing.

Is there a cap on how many zones you can have?

This doesn’t sound like a ZonePlus related issue, I’d recommend seeking more help #help-and-feedback (making sure to include your server sided code).

No limit.

Zone.partEntered uses a TouchTransmitter, is there a way to make it so CanTouch is false or make it so parts cant interact with the zone using own touch event while maintaining their touch event for other parts, since i dont want stuff like projectiles interacting with the zone.

image

Nah its all good i fixed it myself, thanks for the response though.

Thanks for the feedback, this is currently a limitation with part checking. I’ve opened up a feature card for this to be completed for the next update:

If there’s anything you’d like added/changed to the proposed API feel free to lemme know!

2 Likes

Sorry i keep asking for so much help, but when someone resets while on the skateboard (skateboard has a localscript in it that uses zoneplus) the whole system just stops working? not even an error in the console or anything.

1 Like

well, the main thing i am looking for right now, is so projectiles with a touchtransmitter does not react with the zone, (usually to fix projectiles reacting is to turn the part that the projectile will touch’s cantouch to false, but doing that with zoneplus causes problems)

If a player dies their tools will be destroyed alongside their character meaning the scripts inside get destroyed too (hence stop working).

Correct me if I’m wrong but doing zone:addToDenylist(yourProjectile) after the proposed API above has been released sounds like it would solve your problem (since the projectile would then be ignored by the zone).

1 Like

I tried moving it to StarterPlayerScripts, StarterCharacterScripts and StarterPack and it always has the same issue.

I think what they are talking about it the projectile itself interacting with the zone.

This is really cool, it opens up potential for new games; even better for people who might not know much Lua, yet.

1 Like