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

Starter Character.
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE(Need this so I could do the 30 minimum world.)

Have it set inside StarterPlayer instead.

2 Likes

Thank you for your help.


1 Like

Hello, I have a question. How do I make a zone which sets a GUI to visible and invisible when exiting but only on the player that’s on the zone? I’m trying to make a shop zone but I do not know how you make a gui visible and invisible using zone+ since I do not really know how to code.

i got u fam
shopgui.rbxm (8.2 KB)
download this and make sure to drag and drop it into “StarterGui” inside the explorer

also make sure to have a part called “ShopPart” inside the workspace
and you can make changes to the script if you want to

2 Likes

This helps a lot, thanks for the help!

I’m having issues using Zone Plus… It seems like Zone Plus doesn’t work after a player has died. When I try going to a zone after dying it doesn’t do anything it’s supposed to do. The zones work but only if the player hasn’t died yet. How do I fix this issue?

Why is there a delay when a player enteres a zone on the PlayerEntered event and PlayerExited?

Zone works as its suppose to work, that 's surely an issue with your coding

Baseplate.rbxl (75.3 KB)

This is the problem I told you before, where you can tell if you enter the cylinder area and sometimes jump, it will print “'Exited” even if you are still inside the cylinder.

Make sure to have “Decomposition Geometry” Enabled.

image

Hello
When zone:setDetection is “WholeBody”, the “playerEntered” event will be triggerred when all parts of the player are in the zone or if any part of the player is in the zone?

Thanks

The script seems to stop working if a player has died. When I try to enter the shop zone after dying, the shop gui doesn’t show up. Do you know why is this happening?

You don’t need to reply to yourself, that’s considered spam. Where is your script located and what is the code?

yeah i’m having the same issue, not sure if its a glitch or what not but just disable
reset on spawn on the gui and it should work

This is the code that I used for my game. The script is also inside the gui. Do you know why the script won’t work after death?

1 Like

just change the screen gui for the reset on spawn to be off
and i think it’ll work

1 Like

Let me try doing that. I’ll see if it works or not.

1 Like

Hi, I’m trying to make each Ambient Zone from the playground play a different sound depending on the time of day, but it’s just… not working. No errors in output, and everything is where it should be.

(This is the ambient zone script btw)

-- This creates a zone for every ambient group, then listens for when the local player enters and exits
local LABEL_DURATION = 3
local FADE_INFO = TweenInfo.new(1)
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local localPlayer = game.Players.LocalPlayer
local playerGui = localPlayer:WaitForChild("PlayerGui")
local tweenService = game:GetService("TweenService")
local runService = game:GetService("RunService")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AmbientContainer"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

local ambientAreas = workspace.AmbientAreas
for _, container in pairs(ambientAreas:GetChildren()) do

	--
	container:WaitForChild("Part", math.huge)
	--

	local zone = Zone.new(container)
	zone:bindToGroup("EnterOnlyOneZoneAtATime")

	local soundDay = container:FindFirstChild("Day")
	local soundNight = container:FindFirstChild("Night")


--	if soundDay then
		local areaLabel = Instance.new("TextLabel")
		areaLabel.BackgroundTransparency = 1
		areaLabel.Size = UDim2.new(1, 0, 0.08, 0)
		areaLabel.Font = Enum.Font.Garamond
		areaLabel.Text = container.Name
		areaLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
		areaLabel.TextTransparency = 1
		areaLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
		areaLabel.TextStrokeTransparency = 1
		areaLabel.TextScaled = true
		areaLabel.TextWrapped = true
		areaLabel.Name = container.Name
		areaLabel.Parent = screenGui

		local endLabel = Instance.new("BindableEvent")
		--			soundDay.Name = container.Name
		--			soundDay.Parent = screenGui

		zone.localPlayerEntered:Connect(function()
			
			while true do
				wait(0.1)
				if game.Lighting.ClockTime >= 7 and game.Lighting.ClockTime <= 20 and soundDay.IsPlaying == false and soundNight.IsPlaying == true then
					soundNight:Stop()
					soundDay:Play()
				elseif game.Lighting.ClockTime >= 21 and game.Lighting.ClockTime <= 6 and soundDay.IsPlaying == true and soundNight.IsPlaying == false then
					soundNight:Play()
					soundDay:Stop()
				end
			end
			
			--				tweenService:Create(soundDay, FADE_INFO, {Volume = originalVolume}):Play()
			tweenService:Create(areaLabel, FADE_INFO, {TextTransparency = 0, TextStrokeTransparency = 0.3}):Play()
			local ended = false
			task.spawn(function()
				local endTick = tick() + LABEL_DURATION
				repeat runService.Heartbeat:Wait() until tick() >= endTick or ended
				if not ended then
					endLabel:Fire()
				end
			end)
			endLabel.Event:Wait()
			ended = true
			tweenService:Create(areaLabel, FADE_INFO, {TextTransparency = 1, TextStrokeTransparency = 1}):Play()


			zone.localPlayerExited:Connect(function()
				--				local fade = tweenService:Create(soundDay, FADE_INFO, {Volume = 0})
				--				fade:Play()
				endLabel:Fire()
				--				fade.Completed:Wait()
				--				fade:Destroy()
			end)
		end)
	end
--end

Idk what i’m doing wrong

Where is this script located at?
And you have a while true do loop running when it doesn’t need one, and it’s also blocking the rest of the code block from running.

It’s the default Ambient Zone script, it’s at StarterPlayerScripts