Trouble with Zone +

I’m trying to learn how to use Zone +, but I’m having trouble, the code below won’t work:

local RP = game:GetService("ReplicatedStorage")
local HD = require(4664437268)
local ZP = RP:WaitForChild("HDAdmin"):WaitForChild("Zone+")
local ZS = require(ZP:WaitForChild("ZoneService"))
local zonePart = game.Workspace.Zone
local zone = ZS:createZone("Zone", zonePart)

zone.playerAdded:Connect(function(plr)
	
	print(plr.Name.." Joined!")
	
end)

zone.playerRemoving:Connect(function(plr)
	
	print(plr.Name.." Left!")
	
end)

zone:initLoop()

I think I did something wrong when requiring the modules, but I’m not sure

1 Like

Did you have any errors in the output? I think something is wrong with the module.

Here’s a good tutorial on how to properly require a module Introducing: Modules

1 Like

No, I did not get errors (30 chars)

1 Like

Hi, I wrote this. This is not a tutorial for requiring ModuleScripts. It’s a ModuleScript which makes it easier to require other ModuleScripts. It is not a substitute for knowing how to require ModuleScripts normally.

OP, you need to debug your code by adding print statements to get more information. Verify that your code is even running the first place. Find out if it’s hanging in a certain point. If module A requires B, and B requires A, both A and B will hang forever.

Your variable is named “zonePart”, so I’m guessing its a part.
Currently Zone+ requires you to use a container like a Model or a Folder for it to work.
Check out the Zone+ Documentation: https://1foreverhd.github.io/HDAdmin/projects/zoneplus/about/

1 Like

Thx! That was the problem (30 chars)