Issue with ZonePlus v3.2.0 when Streaming is enabled

Hello!

I’m having an issue with the Streaming Enabled and the ZonePlus v3.2.0 resource. I’ve been searching for a solution to this everywhere for weeks and haven’t been able to find any solution that fits my situation.

The problem starts when I enable Streaming Enabled (and yes, everything works perfectly when it’s disabled). So I’m using Streaming Enabled for interior lights, but I’ve tried using WaitForChild() and modifying the script a bit, but it doesn’t seem to fix the issue.

I already posted something similar to this in the original resource post, but I haven’t received any solutions yet. If anyone knows how to fix it or has a similar problem, I would greatly appreciate your help.

The local script on StarterPlayerScripts: (No errors in the console)

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Zone = require(ReplicatedStorage.Modules.Zone)
local ZoneController = require(ReplicatedStorage.Modules.Zone.ZoneController)
local Lighting = game:GetService("Lighting")

for i, v in pairs(game.Workspace:WaitForChild("InteriorLights"):GetChildren()) do
	local AllParts = Zone.new(v)

	AllParts:bindToGroup("AmbientAreas")

	AllParts.localPlayerEntered:Connect(function()
		Lighting.Ambient = Color3.fromRGB(255, 255, 255)
	end)

	AllParts.localPlayerExited:Connect(function()
		Lighting.Ambient = Color3.fromRGB(70, 70, 70)
	end)
end
1 Like

I also have this issue so ima just comment just to bump this

The problem, assuming you’re using similar code, is probably that :GetChildren is used instead of :GetChildren and ChildAdded.

Streaming enabled means that not all of the parts are going to be there initially. This means you either need to wait for them individually with WaitForChild, or that you need to use events to handle them when they’re streamed in (i.e. ChildAdded).