Hello,
I am currently trying to make a zone using a module named ZonePlus.
I’m trying to achieve a server response whenever a player enters and leaves the zone.
This is my current code:
-- VARS
local ZoneModule = game.ReplicatedStorage:WaitForChild("Modules"):WaitForChild("Zone")
local ZoneConnect = ZoneModule.new(workspace.SafeZone)
-- FUNCTIONS
ZoneConnect.playerEntered:Connect(function(player: Player)
print(player.Name.." Has entered the zone")
end)
ZoneConnect.playerExited:Connect(function(player: Player)
print(player.Name.." Has left the zone")
end)
And the error it returns when I load the game is:
new is not a valid member of ModuleScript "ReplicatedStorage.Modules.Zone" - Server - SafeZoneTest:3
Even though in the module script it is there on line 34?
Any help would be much appreciated!