This script outputs:
Workspace.GeneratedWorld1.Scripts.SpreadBioms:13: attempt to index field 'Parent' (a nil value)
wait (10) wait() while true do wait () if game.Workspace.GeneratedWorld1.Values.SpreadBioms.Value == true then local LocalTransparency = 0 local descendants = game.Workspace:GetDescendants() for index, descendant in pairs(descendants) do if descendant.Name == "BiomCenter" then print (descendant.Name) print (descendant.Parent.Name) if descendant.Parent.BiomIsSpread.Value == false and descendant.Name == "BiomCenter" then ----[1]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value..","..descendant.Parent.XName.Value) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value end wait (0.01) ----[2]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value + 1 ..","..descendant.Parent.XName.Value) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[3]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value - 1 ..","..descendant.Parent.XName.Value) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[4]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value ..","..descendant.Parent.XName.Value + 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[5]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value ..","..descendant.Parent.XName.Value - 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[6]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value + 1 ..","..descendant.Parent.XName.Value + 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[7]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value - 1 ..","..descendant.Parent.XName.Value + 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[8]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value + 1 ..","..descendant.Parent.XName.Value - 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) ----[9]---- local found = descendant.Parent.Parent:FindFirstChild(descendant.Parent.ZName.Value - 1 ..","..descendant.Parent.XName.Value - 1) if found then local BiomFields = game.Lighting.BiomeFields:GetChildren() local ChoosenField = game.Lighting.BiomeFields:FindFirstChild(math.random(1, #BiomFields)) local FieldCloner = ChoosenField:Clone() FieldCloner.Parent = game.Workspace.GeneratedWorld1.Fields FieldCloner.Name = (found.ZName.Value..","..found.XName.Value) FieldCloner:SetPrimaryPartCFrame(CFrame.new(found.PositionX.Value,found.PositionY.Value,found.PositionZ.Value)) FieldCloner.PositionX.Value = found.PositionX.Value FieldCloner.PositionZ.Value = found.PositionZ.Value FieldCloner.PositionY.Value = found.PositionY.Value FieldCloner.XName.Value = found.XName.Value FieldCloner.ZName.Value = found.ZName.Value found:Destroy() end wait (0.01) descendant.Parent.BiomIsSpread.Value = true descendant.Parent:Destroy() end end end end end
The issue is the name is supposed to be used for instances, not services. Make sure to not print services such as workspace. Lighting shouldn't be used as a storage. ServerStorage should be used for it. I'm afraid I can't paste the script to show as it's too long for an answer. So in other words.
-Make sure to delete line 13, workspace is a service, so it wouldn't work in this situation
-Move all the items you referred from Lighting to ServerStorage. Lighting shouldn't be a storage center
-Make sure to change all the "Lighting" to ServerStorage at the end!