So, It seems that Roblox messed up this code, but idk how to really fix it.
In the “Infinite Mining Game Kit” By berezaa, Every time a cave generates, it seems to break and shows this error.
![]()
I tried to rewrite the code a bit, but it doesn’t seem to work, anyone know the issue?
if Override ~= "Branch" and Override ~= "BranchProtect" then
if CaveInfo == nil then
CaveInfo = {}
CaveInfo.Origin = Vector3.new(x,y,z)
-- Should this cave contain a zombie?
local Chance = Rand:NextInteger(1,8)
CaveInfo.HasZombie = false
CaveInfo.FirstZombie = false
if Chance <= 2 then
CaveInfo.HasZombie = true
CaveInfo.ZombiePos = nil
end
end
local Origin = PositionKey(x,y,z)
GCounts[Origin] = 0
--coroutine.resume(coroutine.create((function()
for i,Vec in pairs(VectorsGen) do
local NewPos = CompactPos + Vec
if UsedPositions[PositionKey(NewPos.x,NewPos.y,NewPos.z)] == nil then
GCounts[Origin] = GCounts[Origin] + 1
GenerateOre(NewPos.x,NewPos.y,NewPos.z,"Branch",Origin,nil,nil,CaveInfo)
end
end
--end)))
else
local Protection = false
local Origin = PresetOre
--local SpecialCave
-- Ladder brick support
if (CaveInfo.HasZombie and CaveInfo.ZombiePos == nil) then
--generate cave
end
end