Im using parallel to create own ZonePlus (more optimized) and almost completed it.
But i have this issue?
Any ideas what this could be related to?
-- Parallel worker code:
local Actor = script:GetActor()
local function GetPartsInPart(Part: BasePart, Params: OverlapParams?)
return workspace:GetPartsInPart(Part, Params)
end
local function GetPartBoundsInBox(Part: Part, Params: OverlapParams?)
return workspace:GetPartBoundsInBox(Part.CFrame, Part.Size, Params)
end
local function GetPartBoundsInRadius(Part: Part, Params: OverlapParams?)
return workspace:GetPartBoundsInRadius(Part.Position, Part.Size.X, Params)
end
local function GetPartsMethod(BasePart: BasePart)
if BasePart:IsA(`Part`) then
if BasePart.Shape == Enum.PartType.Block then
return GetPartBoundsInBox
elseif BasePart.Shape == Enum.PartType.Ball then
return GetPartBoundsInRadius
end
end
return GetPartsInPart
end
Actor:BindToMessageParallel(`Step`, function(BindableEvent: BindableEvent, Container: BasePart, Params: OverlapParams?, Index: any)
debug.profilebegin(`Step`)
BindableEvent:Fire(Index, GetPartsMethod(Container)(Container, Params))
debug.profileend()
end)

